how to change attribute in descendant?

Jari-Matti Mäkelä jmjmak at utu.fi.invalid
Thu Jan 18 16:45:01 PST 2007


Jarrett Billingsley kirjoitti:
> "Jari-Matti Mäkelä" <jmjmak at utu.fi.invalid> wrote in message 
> news:eooa7j$1bie$1 at digitaldaemon.com...
> 
>> Sorry - the question was a bit naive. What I meant was that why isn't it
>> working.
> 
> Since the spec never says anything about protection on base 
> classes/interfaces, and since it's been asked about many times, I guess it's 
> one of two things: (1) a vestige from a long, long time ago when these were 
> planned to work, but were never implemented, or (2) just there for future 
> expansion.  It'd be interesting to see what code is there for it in the 
> compiler frontend. 

They have been a very long time there. I suppose Walter has copied them
from the C++ spec and forgotten a bit later.

I don't mind even if D won't support them, since Java also has plain
public inheritance and it's still usable as a language. Most of the
information hiding can be done by abstracting the classes more. Private
inheritance at least might cause some odd corner cases on runtime when
used in conjunction with the implicit friend syntax within the same
module and interfaces.


More information about the Digitalmars-d-learn mailing list