lua-users home
lua-l archive

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


On Sat, Jan 9, 2010 at 13:43, steve donovan <steve.j.donovan@gmail.com> wrote:
> On Sat, Jan 9, 2010 at 12:26 PM, Alexander Gladysh <agladysh@gmail.com> wrote:
>> What about syntax to append a table to a table? I vaguely remember
>> that it is fits nicely in the bytecode.

> Is it this discussion?

> http://lua-users.org/lists/lua-l/2009-08/msg00242.html

> I remember being persuaded that it was a cool thing.

No that is this one

http://n2.nabble.com/how-to-load-a-very-large-table-with-more-than-2-18-literal-strings-tt3399495.html#a3629639

(Sorry for not linking to it in the first place.)

Basically, instead of

t[#t + 1] = foo
t[#t + 1] = bar
t[#t + 1] = baz

one would be able to write

t:{foo, bar, baz}

without any changes to the VM.

Alexander.