lua-users home
lua-l archive

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


On Thu, Apr 10, 2014 at 8:41 AM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> Suppose that the notation tbl[i,j,k] meant tbl[i],tbl[j],tbl[k], not
> as a syntactic sugar, but as genuine multiple indexing overridable
> by metamethods.

What about defining 'unpackt' so that 'unpackt(tbl,i,j,k)' achieves
the same result?

Granted, it could never be as fast as a hard-baked language feature,
but is fairly explicit and can of course be made to respect suitable
'synthetic' metamethods of tbl.