Pros:
* Tiny
* Crossplatform
* Easy to embed
* Fairly easy to extend
* Has no external dependencies
* Easy to learn due to simple syntax
* Has metatables, which allow creating objects, and with that, allow OOP
Contra:
* The builtin stdlib doesn't allow much more than just basic IO
* The stackoriented API might be confusing to those unfamiliar with the concept of stackbased APIs
* Due to the do ... end syntax, closures and co tend to look clumsy:
pcall(function()
stuff ...
end)
>>1
Lua metatables suck shit, the tables-as-the-base-datastructure would have worked fine if it wasn't for how shitty they are. The semantics are so close to be Lispy, yet so far ;_;. Lua's failure makes me sad and angry. If only...
Their scoping rules are broken. "Global by default" is shit. All code looks like
local local local local local
local local local local local
local local local local local local local local
local local local local
local local local local local local local local local local
local local local
>>23 ARE YOU anoperator?
ARE YOU foreverything?
ARE YOU anoperatorforeverything?
If you answered ``Yes'' to all the above, Perl 6 might be exactly what you've looking for!
I prefer Squirrel to Lua, it uses C-like braces instead of end, it has OO instead of the cludgy OO in Lua. The only thing I dont like in Squirrel and Lua is having to explicitly declare variables as local. I'll stick to Python and Ruby thank you.
>>34
The only reason OO is kludgy in Lua is because metatables are utterly broken. As for declaring variables as local manually, that's a great indicator of a sane language (though it doesn't apply to C++ and Java).
>>37
Call me the ``\`\`\\\`\\\`\\\'\\\\\\\`\\\\\\\`\\\\\\\\\\\\\\`\\\\\\\\\\\\\\`in Lisp\\\\\\\\\\\\\\'\\\\\\\\\\\\\\' guy\\\\\\\'\\\\\\\'\\\'\'\'''
Name:
Anonymous2011-01-22 20:30
>>36
Is there a summary somewhere of what is wrong with Lua metatables? Do you mean the particular implementation details in Lua, or the general concept?
>>39 Do you mean the particular implementation details in Lua, or the general concept?
Both. There are things you can override in metatables, and there are things you can't. That's really bad.