lua-users home
lua-l archive

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

On Wed, 27 Feb 2013 15:56:36 -0500
"D. Matt Placek" <> wrote:

> On Wed, Feb 27, 2013 at 3:46 PM, Petite Abeille
> <>wrote:
> >
> > On Feb 27, 2013, at 9:20 PM, Steve Litt <>
> > wrote:
> >
> > >  Sure, Lua has
> > > a lot of tools, but from what I've heard and seen, they're in
> > > various stages of development, and a standard Lua installation
> > > doesn't contain them, which makes deployment tougher.
> >
> > Perhaps.
> >
> > On the other hand, if one needs  "SNMP, or quick-dev a GUI , or web
> > app, or parse XML or
> > YAML", then there are gazillions of battle tested, industrial
> > strength,  C libraries at one's disposal.
> >
> This is one of the greatest strengths of Lua, IMO; yes, ruby and perl
> etc. have a larger base of ready-made packages, but try integrating
> your own custom C++ class. Ouch!  Lua is so straightforward and
> simple to integrate with C/C++ code that for most purposes, any C or
> C++ library is ready to use with Lua.

D Matt,

I think you've put your finger directly on the pivot point of the whole
discussion, and you've identified exactly where I failed to be

I'm willing to bet there's not one person on this list who wouldn't say
Lua is the best language for games, or at least the part of games that
can be scripted. I'll bet nobody here would pick a language other than
Lua to intermix with C or C++. Probably at least 90% of us would say
Lua is the best core language.

What I was trying to say, and I failed miserably, is that in an
alternate universe, Lua *could* be the best language for everything. It
could run the board. In this alternate universe, you need only two
languages for any task involving telling a computer how to behave: Lua
and C (and maybe C++ if that's your thing). In this alternate universe,
Lua comes packaged with a wide variety of libraries, like Python does.

Now please understand, in this alternate universe, the Lua language is
exactly the same. Nothing about these libraries dilutes its ability to
integrate with C or its table-centricity. No special syntax, semantics,
or syntactic sugar is necessary. It's still the best higher level game
dev language. The only change is this: In this alternate universe,
there's absolutely no need for Perl, Python, Ruby, or PHP, because no
matter what you're doing, Lua is the fastest and easiest way to do it.

Back to our universe. You mentioned that any C or C++ library is ready
to use with Lua. That depends on your definition of "ready to use". A
lot of people, myself included, wouldn't call something ready to use if
you need to manage your own stack and manage your own malloc and free.
Doable? Yes. Better able to do it than Perl, Python and Ruby?
Obviously. But ready to use? Almost by definition, no, because you
have to use Lua's tools to build the interface.

Someone in this thread mentioned that difficulties build character.
That's true, but we all carefully choose our character building
difficulties. If I'm going to build an SNMP app, my chosen difficulty
will be the problem domain, not the language. True story -- I once got
paid to whip out an SNMP app using Perl with the CPAN SNMP library,
because their Java Jeniuses needed six months to finish the Java
version, and the customers were demanding it RIGHT NOW. The
availability of the Perl SNMP module was the thing that enabled them
to satisfy (and therefore keep) their customers, and incidentally
enabled me to make a pretty penny. While their Java team was in their
first week of building character, I saved their bacon with a CPAN

Obviously, nothing in the preceding paragraph has anything to do with
Lua's facility in game programming or interfacing with C, nor does it
have anything to do with Lua's being the best core language. All I'm
saying is that *if* the current Lua language either came packaged with
tested, quality libraries, or even came with an up to date document
pointing to currently tested, quality libraries, there would be no
reason for anyone to ever use any other language, for any purpose other
than next-to-the-metal stuff. And if *that* happened,  there would be a
lot more people building quality libraries, and there would be a lot
more jobs for Lua programmers. And none of this would require even one
change in the current language.