lua-users home
lua-l archive

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


On Mon, Apr 02, 2012 at 12:27:53PM +0200, steve donovan wrote:
> On Mon, Apr 2, 2012 at 12:19 PM, Rob Kendrick <rjek@rjek.com> wrote:
> > t[1, 2, 3] is to  __slice(t, 1, 2, 3) as t[1] is to __index(t, 1).  ie, a metamethod.
> 
> Cool, now I get it.  And in the presence of __slice, does t[1] resolve
> to __slice(t,1)?

We'd not thought about it, but my initial feeling is "no", as it would
require two table lookups to decide which to call, rather than one.

B.