lua-users home
lua-l archive

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


2015-01-17 20:33 GMT+02:00 Mark Hamburg <mhamburg.ml@gmail.com>:

> While one can chain __index accesses, in my experience, it doesn't work particularly well if you want to do anything more than lookup a value. __index is more like a delegation link than it is like an inheritance link.

At times like this, it is useful to remember that metamethods
started out as fallbacks. A way to avoid failure in an exceptional
case rather than a routine technique.