[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Clean Lua
- From: Dirk Laurie <dirk.laurie@...>
- Date: Fri, 18 Nov 2011 15:27:51 +0200
2011/11/18 Francesco Abbate <email@example.com>:
> I'm also among the Lua users that are not waiting for 5.2. It seems to
> me that you break the compatibility, eliminate some useful things to
> add some dubious minor improvements.
> This is of course just my point of view but it seems that the
> transition to Lua 5.2 costs a lot and the benefits are dubious or
> non-existent at all. Probably the only interesting improvent is the
> "yieldable pcall and metamethods".
> Also the addition of the "goto" statement completely defeats my
> I will personally not switch to Lua 5.2 as long as I can.
> Please understand that I don't want to be polemic here I'm just
> expressing my humble point of view about Lua 5.2.
Just as Lua is written in "clean C, the common subset of Standard C
and C++", one can write one's new programs in "clean Lua, the common
subset of Lua 5.1 and 5.2". Here is a partial list.
1. unpack = unpack or table.unpack
2. Don't use # or the table library on non-sequences.
3. Don't use goto.
4. Write modules to return a table containing everything and load them by
mymod = require "mymod"
5. Load bit32 explicitly if you need it.