lua-users home
lua-l archive

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


On Mon, Apr 14, 2014 at 3:34 AM, Coroutines <coroutines@gmail.com> wrote:
> I'd like to see pack()/unpack() added back for compressing a number of
> objects on the stack into a userdata and "unpacking" them to where a
> vararg might be expected.

Ah, but Lua never had pack()/unpack() like you describe - they were
just put into the table namespace.

That is, pack makes a table from varargs.

Are you thinking of the pack defined in that varargs library?

I can't see how existing pack can be made more efficient - the varargs
need to be stored, and a table is a natural container for them.