lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



On Behalf Of Thatcher Ulrich
> Sent: February 5, 2003 4:17 PM
> To: Multiple recipients of list
> Subject: Re: A "collaborative book" on Lua? (or: Bruce 
> Eckel's take on Lua)
> 
> I have only a very limited knowledge of Python, but I believe it does
> have a number of built in module-oriented features.  And, the huge
> base of libraries that Bruce mentions.  Those are probably the two
> most important programming-in-the-large features, IMO.  Perl had those
> features earlier AFAIK, and is probably still much more widely used,
> but Python is much easier than Perl for casual programmers (or
> full-time programmers who usually use a different language), so it
> seems to be gaining ground.

http://www.linuxjournal.com/article.php?sid=3882 :-

"Writing these programs left me progressively less satisfied with Perl.
Larger project size seemed to magnify some of Perl's annoyances into
serious, continuing problems. The syntax that had seemed merely
eccentric at a hundred lines began to seem like a nigh-impenetrable
hedge of thorns at a thousand. ``More than one way to do it'' lent
flavor and expressiveness at a small scale, but made it significantly
harder to maintain consistent style across a wider code base. And many
of the features that were later patched into Perl to address the
complexity-control needs of bigger programs (objects, lexical scoping,
``use strict'', etc.) had a fragile, jerry-rigged feel about them. 

These problems combined to make large volumes of Perl code seem
unreasonably difficult to read and grasp as a whole after only a few
days' absence. Also, I found I was spending more and more time wrestling
with artifacts of the language rather than my application problems. And,
most damning of all, the resulting code was ugly--this matters. Ugly
programs are like ugly suspension bridges: they're much more liable to
collapse than pretty ones, because the way humans (especially
engineer-humans) perceive beauty is intimately related to our ability to
process and understand complexity. A language that makes it hard to
write elegant code makes it hard to write good code."

There are some interesting points in the essay which may be applicable
to Lua.


> On the other hand, Lua cannot compete with Python's libraries, tools,
> and community.  [But if you want to do something about that,
> contribute a module to the Lua Binary Modules collection at
> http://lua-users.org/wiki/LuaBinaryModules]
> Otherwise, I think the two languages have a lot in common.

An interesting idea that springs from the mail is that Ruby can use the
Python libraries. If someone wrote a proxy to do this you might get some
quite interesting results. Its seems a lot of effort to build up a
competing Lua resource when Python is nice to use and there is so much
free and easy material out there.


> I don't know if Lua can catch up to Python in the areas that Python
> excels at.  Also, honestly I don't know if it's worth the effort; if
> the goal is popularity and longevity, Lua should probably continue to
> focus mainly on the areas where it has good acceptance.  As far as
> book sales go, I think a book like "Game Programming with Lua" might
> do OK.

I agree. Lua started out as a "niche language", for configuration of
applications. It has some very nice features due to this but it has
since broadened out and become more powerful, still obeying some of its
early objectives. I don't think Lua should try and catch up with Python,
if it loses its niche it will lose its identity and users will start
looking for other solutions. I'm currently wondering whether to use Lua5
to replace a simple BASIC type language now that there are concerns
about complexity and slowdown (and no tolua5 :( ).

regards,
Nick