The article seemed a little short for me, but then I am actively trying to select between Lua and TCL for some personal scripting projects. There are many fine features with each language and few downsides, so the selection process is hard. Of course, that's a nice problem to have. TCL is ahead by a nose at this point with Unicode support baked in (vs. using a library) and file system handling built in (again vs. usi…
Tcl is an interesting little language as well, and the niche it was created for is similar to the one Lua was created for. The biggest advantages that Lua has over Tcl, off the top of my head, are speed and lambdas. Tcl's semantics make it very hard to optimize because it is stringly typed (with some bytecode and value specialization in the background, but with conversions between strings and other values as needed).…
Why Lua?
21–30 of 142 posts
Re: Why Lua?
#22In lua, the metatable is the killer feature that python doesn't have.
Re: Why Lua?
#23The worst problem with Lua is that arrays start at 1. That is way too bad for me to use it. I only use it to configure Awesome WM, but it sucks for everything else IMO because of "tables" starting at 1.
There are many features of Lua that have caused me more problems (the somewhat inconsistent string conversion, for instance).
Re: Why Lua?
#24Re: Why Lua?
#25Speed& Simplicity LuaJIT speeds can rival code written in C. And if you are still not getting the speed you want, see my 1st point above (Integration with C and C++ for that matter). The simplicity of Lua is, I think, really underrated. It is a good learning exercise to write some small benchmark / utility / tool in Lua so you can get an idea of how quickly you can develop, and how fast the resulting code will be. Th…
Re: Why Lua?
#26To echo chubot: Why isn't Lua more widely used? * It lacks an easy-to-use symbolic debugger. * It lacks a first-rate IDE. * It lacks a standard way for people coming from OO/Java to define objects and interfaces. * It lacks a GUI toolkit. * It has a great set of manuals. It lacks an O'Reilly book with a woodcut animal on the cover. * Arrays indexes start at 1. Except for the last item, these are all relatively small…
If you want to have some fun with Lua, check out LÖVE[2].
[1] http://lua-users.org/wiki/LuaModuleFunctionCritiqued [2] https://love2d.org/
Re: Why Lua?
#27Earlier quoted context omitted.
> add unicode support This won't happen soon. Lua targets ANSI C and only ANSI C. C11 includes new character types to support unicode, but I imagine that the Lua implementers will take their time. Plus there's implications for embedded situations. If you need unicode (and most do), there are libraries and patches that do a reasonable job.
I'm fine with C-style strings, but once in a while there are things for which a bit of UTF-8 tagging would be good enough.
Re: Why Lua?
#28In lua, the metatable is the killer feature that python doesn't have.
Could you explain what you can accomplish with Lua metatables that you can't do with python __eg__ methods? I've only seen them used as a way to implement operator overloading.
Re: Why Lua?
#29lua (the language and core libraries) is stable and small. many developers are attracted to node.js or rails due to the community ("look, everyone else is doing it!"), ecosystem (abundance of modules/gems to choose from), and rapid release cycles. lua seems to have more of a relaxed, niche community among game developers and scripting language embedders. i've been using lua for about a week so far, for a music player…
There are several server side Lua options with coroutines.
Re: Why Lua?
#30To echo chubot: Why isn't Lua more widely used? * It lacks an easy-to-use symbolic debugger. * It lacks a first-rate IDE. * It lacks a standard way for people coming from OO/Java to define objects and interfaces. * It lacks a GUI toolkit. * It has a great set of manuals. It lacks an O'Reilly book with a woodcut animal on the cover. * Arrays indexes start at 1. Except for the last item, these are all relatively small…