Re: multi-level inheritance and __index
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: multi-level inheritance and __index
- From: Mark Hamburg <mhamburg.ml@...>
- Date: 2015年1月17日 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.)
Mark