lua-users home
lua-l archive

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


Hi,

To make it clear for me, it would have to be something crazy like:
p[end+1] = value

...in which case end would simply be syntactic sugar for 'the length of
the current table'.

This starts looking a lot like Matlab. :)

Although I am not terribly against adding new syntax to Lua,
I think that the benefits of this specific new syntax are
not worth it.

It appears to be only 25% improvement, so most tasks won't
get killed by using table.insert. For the tasks that *will*
get killed, you have two options. Use the
big_table_name[#big_table_name + 1] = value and live with
it, or save it into a local 't' right before you start using
your big_table_name like crazy.

Regards,
Diego.