[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Type Metatables for Table and Userdata - Powerpatch
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 5 Dec 2012 23:17:54 -0200
> So hang on, would this mean that, as a host app or module writer, I can no longer rely on this to work:
>
> t = { 1,2,3 }
> print(t[2])
> -> 2
>
> if some other module or user script has gone and installed a ???clever??? type metatable?
The problems of having *one* event handler for all values of each type
led us to move from fallbacks to metatables. See section 6.8 of our HOPL
paper: http://www.lua.org/doc/hopl.pdf