From: Nathaniel Talbott Date: 2003-12-06T04:48:26+09:00 Subject: Re: Attempted roadmap of future instance variables.... On Dec 5, 2003, at 14:18, Christoph wrote: >> There is no way for the subclass to access the superclass's >> instance variable @a now, and I don't see a good work-around for this. > > You can make the same argument in any situation like > > class A > def meth > ... > end > end > > class B < A > def meth > .. > End > end > > Now there is no way that B-objects can access > A#meth. In this case it is trivial to alias the super-class method if I need continued access to the super-classes implementation. I don't know of a way that could be done for instance variables. More importantly, though, I think instance variables are fundamentally a different construct than methods. I'm having difficulty precisely delineating the differences (internal vs. external?), but I just don't think you can compare the potential problems from method overriding with those of instance variable shadowing. They certainly have commonalities, just as apples and oranges are both fruit, but they have quite different cores. I still think namespaces are a good place to look for the answer to class local instance variables (and perhaps class local methods, too). Nathaniel <:((><