lua-users home
lua-l archive

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


2011/4/13 Henning Diedrich <hd2010@eonblast.com>:
> This seems to be like the atomic operation for it
>
> '[' .. table.concat(t, ',') .. ']'
>
> does a subtler approach come to mind for anybody, e.g. drawing more
> explicitly from LuaJIT's strengths?

Not related to LuaJIT but I guess the following should be better:

string.format('[%s]', table.concat(t, ','))

because it does avoid the creation of unneeded temporary
strings(expect the one returned by table.concat.

Francesco