Re: Question about inheritance
charlesbos73 wrote:
Actually instead of becoming a JLS nazi, I'd recommend
the OP to study the meaning of inheritance in the bigger
OO picture.
What's wrong with citing from the JLS or pointing someone to read there?
The language is astonishingly approachable--try reading the ISO C++
specification sometime. It is also 100% freely available, as well as
being the complete authority on Java. What the JLS says is always
correct (modulo any errata that accumulates).
Besides, resolution of names is an area where what the compiler thinks
you're trying to do and what you think you're trying to do are not
necessarily the same thing.
And there's *much* *much* more heresy to JLS nazis than
that.
OP asked about why shadowing is not recommended, not a diatribe on the
perceived personal opinions of a class of people. FWIW, I haven't
considered any of what you mention to be heretical, and I'm as much a
"JLS nazi" as Lew.
And all this knowledge is accessible thanks to, say,
groups.google.com.
Usenet is the more accurate term.
--
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth