lua-users home
lua-l archive

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

On Thu, Feb 23, 2017 at 4:41 PM, Sergey Rozhenko <> wrote:
> I've made a script to statically catch unwanted global variables access,
> still haven't posted it to the list BTW. Lack of static typing is
> regrettable, but in practice it wasn't a problem because of this script.
> Misnamed fields are still a possibility, maybe I had 1 or 2.

Definitely - any serious use of Lua requires an external checker. My
version is lglob, which also catches things like 'math.sine' and has
whitelisting. (Descended from lhf's orginal luac output parser, via
the David Manura version.)  I remember reading about Adobe Lightroom
(which has LOTS of Lua) and how _careful_ you have to be with a
language without static typing to manage the process. You cannot be a
cowboy beyond several thousand lines of Lua.

> And don't forget about compilation times, which can be a real pain in big
> applications sometimes.

Oh yes, especially for big game engines, and especially when you want
to hot-patch functionality within a game.  It's a matter of
temperament, as well. I hate long compile times and don't like playing
with light sabers ;)  So Lua remains popular even with relatively
quick static languages like Go (I know this because I did a
reflection-based Lua/Go bridge called luar which has just been broken
by Go 1.8. This is a bummer because I don't do Go at the moment -
still looking for a take-over maintainer.).  Not surprisingly, Lua is
also used by Rust people (Rust is a language that can make C++ compile
times look quick sometimes)

steve d.