lua-users home
lua-l archive

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


2008/9/12 Matt Campbell <mattcampbell@pobox.com>:
> The following quote from the recently published Computerworld interview with
> Roberto caught my attention:
>
> Question:  Where do you envisage Lua's future lying?
>
> Answer:  Scripting.
[...]
> My experience has been that given enough libraries, Lua is
> quite good as a primary implementation language.

I use Lua for scripting extensively - generally, if I see a program
with any sort of plugin interface, my first thought is "can I write a
Lua plugin for this?" :-) (And usually I can, the Lua C API really is
a wonderful thing!)

For use standalone, however, I find that I don't look at Lua. The
basic reason for this is embodied in your "given enough libraries"
statement, combined with the ridiculously painful C runtime mess on
Windows.

For scripting (embedding) use, I contend that really the only sensible
option is to use msvcrt (assuming you're not statically linking Lua
and disabling all extension use, when using the same CRT as the main
application is clearly the sensible option). The reason for this is
that msvcrt works when it is used by a DLL (and hence is not
guaranteed to be set up by the application startup code). For msvcr90
(definitely, and I suspect older versions as well) the CRT gets most
upset if it isn't initialised by the main application startup.

But the LuaBinaries standard is msvcr80 - and so, using anything else
requires me to build my own binaries (which for something complex,
like wxLua or Alien, may well be effectively impossible). So for
standalone use, I need to use LuaBinaries, and then I cannot build my
own extensions (I only have VC 2008 Express, which is msvcr90, and
mingw, which is msvcrt - although maybe mingw can be persuaded to
build with msvcr80, if I can get past the manifest rigmarole).

So for scripting (embedding) and standalone, I need to maintain 2
completely separate Lua installations. That's not a disaster, but it
doesn't make for a simple environment. So I stick with Lua for
scripting, and don't use it standalone.

I'd love to see the CRT mess sorted out sensibly, but I don't really
hold out much hope in the short term. Until that happens, though, I
doubt I'll use Lua much for standalone use. (But I'll probably carry
on whingeing about CRT issues on the list :-))

Paul.