lua-users home
lua-l archive

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


2014-03-10 3:48 GMT+02:00 Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>:

> I have arrived late to this thread but in what I've read I can't find a
> single concrete example of how more stack operations in the API would
> simplify existing code, either in the core or somewhere else. I don't
> mind being proved wrong, though. So, let's see some code...

Well, this is at the Lua level, not the C API, but I have often missed
the absence of Lua access to lua_concat. The big point being that
lua_concat respects metamethods but table.concat does not.

Of course, the `n` parameter of lua_concat would be the number
of items given. `select` can be used at the Lua level if necessary.