[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: luajit: any way to make array initialization zero-based?
- From: Chris <coderight@...>
- Date: Wed, 13 Jun 2012 18:27:17 -0400
On Wed, Jun 13, 2012 at 6:15 PM, Coda Highland <chighland@gmail.com> wrote:
> foo = { [0]=0, 1, 2, 3 }
>
> Problem solved.
Not really. Again, for end users (ie. people without a lot of
programming experience) it's confusing and doesn't make any sense.
It's easy to forget even if you do know what you're doing.
Plus unpack and probably other stuff doesn't work (ipairs like you mentioned).
foo = unpack{[0]=0,1,2}
foo == 1 -- oops
It really needs to be integrated into the system, I think I have tried
all the hacks working within the system.
CR