3 ms·
Very true, Lua is optimized for being very small, fast, and portable. It optimizes for embedding, which means you cannot make assumptions about what you are all
by brianm 18y ago
Very true, Lua is optimized for being very small, fast, and portable. It optimizes for embedding, which means you cannot make assumptions about what you are allowed to do, so it errs on the side of very little.
On the other hand, interfacing to C is the nicest of anything I have done, by a long shot, so the lack of batteries isn't that painful in practice. It fills a different niche than python or ruby, in its, it shines.
- nihilocrat 18y agoLua presumes you've already got your own batteries, thank you, and you don't want those crummy off-brand ones that always seem to come "included". Thus, I feel a Lua - to - Ruby/Python comparison is sort of erroneous. Use Lua when you already have all your tools. Use Ruby/Python when you don't have any tools, and you want cool whizbang higher-level stuff. Honestly the benchmark is wholly unsurprising to me; Lua is a much more minimal language. If you need another language to lump Lua with, lump it with Javascript sooner than you would Ruby or Python.
- nuclear_eclipse 18y agoHowever, as a longtime user of Lua, I would still greatly appreciate a default set of "batteries-included" libraries as an option, like what you'll find in Python, so that it could/would be that much faster to write simple applications in pure Lua, without needing to deal with compiling/bridging to C/C++ libraries...
- silentbicycle 18y agoAs a longtime Lua user, you're probably aware of this, but I'm also writing for the other people reading the thread... :) Look at LuaRocks (http://www.luarocks.org/ http://www.luarocks.org/). It's an attempt at a CPAN-like package collection. The stdlib and bitlib libraries, in particular, are pretty necessary. (Also, http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/ http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/ has some others.) Lua errs on the side of only putting what can be implemented fully portably in ANSI C in its standard libary, which makes it a bit spare.