inheriting statics
P T Withington
ptw at pobox.com
Mon Apr 23 13:30:45 PDT 2007
[Picking up on this ancient thread...]
If that is the argument against inheritance, why have the class
statics of all your superclasses be 'in scope'? Doesn't that lead to
similar obscurity? Doesn't it make for fragile code?
On 2007-01-09, at 12:55 EST, Jeff Dyer wrote:
> The argument against inheriting statics is one for simplicity. A class
> defines a factory and the type of instances created by that
> factory. The
> class objects (the factories, not the instances) of different classes
> have unrelated types and purposes, even if the instance types they
> introduce are subtypes. Class statics are a simple convenience for
> sharing state that is somehow associated with the meaning of a
> particular class. Aliasing them through other class objects could lead
> to annoying name conflicts and obscure their otherwise clear meaning.
>
> Jd
[...]
More information about the Es4-discuss
mailing list