Re: Multiple indexing (was: 'in' keyword today)
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Multiple indexing (was: 'in' keyword today)
- From: steve donovan <steve.j.donovan@...>
- Date: 2014年4月10日 09:45:44 +0200
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.