[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Clean Lua
- From: "Dimiter \"malkia\" Stanev" <malkia@...>
- Date: Fri, 18 Nov 2011 09:58:19 -0800
What is the purpose of this?
With other languages, there are many different implementations, and even
compilers from the same vendors differ, as "C" exposes the machine bits
So it makes sense to have "clean" C there, as in - use only things that
would for sure compile on most of the "C" compilers out there...
But why for lua?
On 11/18/11 5:27 AM, Dirk Laurie wrote:
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.