lua-users home
lua-l archive

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


>  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 :( ).

Please, let us put that straight:

1) Lua 5.0 is faster than Lua 4.0. Some particular mechanisms may be
a little slower, but most basic mechanisms are faster (some are much
faster). So, as long as your program does something useful (instead of
loops just exercising a particular feature), it will probably run faster
in Lua 5.0.


2) Complexity is difficult to measure. But it seems to me that the extra
complexity in Lua 5.0 is due only to new features, which everybody likes
(e.g. coroutines); features equivalent to 4.0 are the same or simpler
in 5.0. For any measure I can think, metatables are simpler than tag
methods: fewer events, fewer API functions, fewer concepts, easier to
program. Lexical scoping is simpler than upvalues (it is just regular
variable manipulation, after all).

Of course, for those that already learned Lua 4.0 but not yet Lua 5.0,
Lua 4.0 seem simpler. Moreover, Lua 5.0 still has less documentation
than Lua 4.0 (which does not have much itself). So, if the complain is
"I have to learn a bunch of new things to change to Lua 5.0", then I
agree. But to simply say "Lua 5.0 is more complex than 4.0" is not fair.


3) yes, there is no tolua5 :-(  (yet)

-- Roberto