lua-users home
lua-l archive

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

 On 1/31/2011 5:02 PM, joao lobato wrote:
Well, you could just patch the functions in table to assume 0 as the
base index, write your numeric for's as starting from 0 and either
refrain from using the {1,2,3} constructor or just write is as

Except that:

1) I lose all benefit of being compatible with "real" Lua. That's significant loss.

2) The length operator "#" enshrined 1-based arrays as language law even if it was only convention prior.

3) The fact that I have to write a numeric "for" to iterate in this day and age ticks me off. :)

Patching this would be like the FORTRAN people who used to write C macros to make it a 1-based language. There's no point. Use FORTRAN or use C, don't try to mutate one into the other.

I use Lua when I need Lua.  Otherwise, I grab something else.