Re: t[] = 'syntactic sugar'
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: t[] = 'syntactic sugar'
- From: Axel Kittenberger <axkibe@...>
- Date: 2012年1月19日 18:27:01 +0100
> That would confuse "C" people.
Lua never gave a dime to how it compares to C or to make similar or
non-confusing dissimilarities.
Otherwise # to be a shorthand for length for the innermost array would
be a welcome shortening, and in some cases even more efficient.
Compare
a.b.c.d.e[#] = 1
with
a.b.c.d.e[a.b.c.d.e.length] = 1
Where the former only walks to look up chain through once, to gain
same performance with current lua, you need a temporary variable.