[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: multi-level inheritance and __index
- From: Mark Hamburg <mhamburg.ml@...>
- Date: Sat, 17 Jan 2015 10:33:35 -0800
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.
As a result, I tend toward having no "runtime" dependencies between subclasses and superclasses. (The last class system I built had no inheritance support though it did provide for mixins at class construction time.)