Why Metalua isn't Lisp
metalua.blogspot.com
metalua.blogspot.com
(The article itself is from 2007.)
I'm still working on metalua, but there are few things which are worth being published yet. Promising works in progress include:
- friendlier syntax to write grammar extensions (current grammars are too verbose, AST builders are ugly and barely readable)
- a library of "for ... in" generators, to walk through ASTs in a nicer, more lua-like way than with the current metalua.walk library. This should eventually become generic enough to become an interesting XML / JSON / whatever-kind-of-tree tool
- integration with LuaEclipse, and generally speaking, more focus on metalua as a way to manipulate / refactor plain Lua programs, rather than as an independent language.
On the balance, I'm quite happy with the trade-off (it's strong pressure to keep Lua small, clean, and portable), but it makes using Lua standalone a bit weird. Particularly if you expect it to have "batteries included" like Python. It's very powerful combined with C, though, whichever is the primary language.
Also, the LuaRocks (http://luarocks.org/) project is growing a central, CPAN-ish module repository, which helps.
It seems to me that the main social reason is a love for poor, partial and repetitive wheel re-invention. People come and reinvent yet another OO framework, OS threading interface, preprocessor, bit shuffling lib, functional table handling lib, etc. again and again, instead of focusing their efforts on a couple of most promising candidates. Java, for instance, doesn't have this issue.
Why is it so? I'd guess:
- there's no std lib: therefore you look slightly less foolish trying to write a half-assed std lib for Lua than for Java or Python. For this reason Lua is probably doomed to consistently attract wheel re-inventors.
- the language is too fun for its own good, with all of its meta-mechanisms. You can have a lot of fun writing a bad library, much more than in Java or in Python. Java is dull, so people communalize their boilerplate; Python has an opinionated dictator, and a culture that frowns upon gratuitous reimplementations.
- Lua's canonical use-case is to provide logical glue around a C library. This means that "serious" Lua users don't need standardized libraries, and such wannabe-standard libs are therefore mostly written by "non-serious" Lua hackers.
I'm not sure that Lua presents enough advantages, compared to Python, to develop a high-quality "batteries included" libraries set. Python is good enough to prevent replacements from being completed, just as Emacs, or LaTeX, or Windows as a mainstream desktop OS, are good enough to prevent direct competitors from emerging.
I think you're absolutely right about Python (and Emacs, etc.) being good enough to prevent many serious competitors.
Actually .. what exactly is the problem with Dylan?