lua-users home
lua-l archive

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


On 10/15/12, Marc Lepage <mlepage@antimeta.com> wrote:
> Yeah, it's just that being notified of setmetatable would facilitate using
> metatables to build state machines (getting notification of the state
> change), and wrapping metatables allows states to be composed, but the
> notification is also necessary for maintaining the wrapping.
>

Isn't the point of metatables that objects are not aware of them? I
mean, when a table does not know what to do it consults its metatable
(that may consult its metatable).

Being notified that your metatable changed sounds like "reversing the polarity".