[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Is Lua the next big thing?
- From: "Spencer Schumann" <gauchopuro@...>
- Date: Thu, 8 Mar 2007 19:54:31 -0700
I find that Lua is wonderful as an embedded language, which is its
reason for existence. For non-embedded scripting tasks, however, I
find Perl/Python/Ruby to be more suitable, due to their extensive
libraries. Perl particularly shines in this area with CPAN, but the
other two are not that far behind.
As far as the language itself goes, Lua is a fine language. One of
the most important language features for me is first class functions
with lexical scoping. Lua's lexical scoping is done right; Ruby and
Python both behave somewhat strangely in this regard. With no keyword
to introduce local variables, those languages have to apply heuristics
to determine when to create new bindings. Perl also has proper
lexical scoping, but it can be hard to see past all of its
idiosyncrasies.
Lua is very much like Scheme in its philosophy; it is a minimalistic,
clean language with powerful mechanisms that can be used to build
higher abstractions. Unlike Scheme, Lua has a definitive
implementation that is fast and well supported. But, Lua shares
Scheme's general lack of library support. While some Scheme
implementations such as MzScheme and Chicken Scheme are beginning to
change this, the support is nothing like what Perl enjoys.
One reason for the sparse library support for both Lua and Scheme
stems from their language philosophy. For instance, neither one has a
standard object system, but both provide means for building one. This
makes library inter-operation difficult, since libraries built on top
of one object system are generally not compatible with libraries built
with other object systems.
To get this rambling mess back on topic, for Lua to be the next big
thing, it's going to need a larger standard library and more
comprehensive add-on libraries. LuaForge is a good step in this
direction, and, a while back, I saw a project (whose name I've
forgotten) aiming to create a larger set of standard Lua libraries.
This effort needs to be expanded. Of course, this needs to be done
carefully; Lua must not lose its ease of embedding in the process of
gaining more libraries. Perhaps, in the end, embeddability and
extensibility are incompatible with extensive library support; I'm not
sure.
- Spencer