[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: multi-level inheritance and __index
- From: Dirk Laurie <dirk.laurie@...>
- Date: Sun, 18 Jan 2015 00:13:20 +0200
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.