|
Am 23.06.2016 um 17:29 schröbte steve donovan:
On Thu, Jun 23, 2016 at 5:16 PM, Philipp Janda <siffiejoe@gmx.net> wrote:As long as Lua 5.1 (via LuaJIT) is still relevant, `table.pack` isn't really that useful since you need `{n=select('#',...),...}` anyway ...It's trivial to define table.pack when you use that pattern, although it's going to be a little slower. Making applications version-tolerant is not a big deal.
That's actually my point. The easiest and shortest way to support Lua 5.1 and up is to just use `{n=select('#',...),...}`. Why complicate and lengthen your code with ifs and feature tests? If you want to use `table.pack()` is has to be *in addition* to the Lua 5.1 idiom.
Philipp