Suggestion: Allow Multiple Inheritance and still preserver super() functionality
Scott S. McCoy
tag at cpan.org
Fri Mar 7 01:24:50 PST 2008
On Fri, 07 Mar 2008 12:40:54 +0900, Mike Parker wrote:
> Jim Gadrow wrote:
>
>
>> I will first state that I don't like the super() function because I
>> don't believe the keyword 'super' very clearly identifies what is going
>> on. wouldn't parent() have been more suitable?
>
> The term 'superclass' is more common in the OOP vernacular than 'parent
> class', so super() is spot on, IMO. You'll find the same used in Java
> and probably some other languages.
>
> Using 'parent()' would almost certainly cause some consternation among
> some D users, since the terms 'parent' and 'child' are often used to
> describe relationships in data structures. It's not uncommon to see
> methods like parent() (or getParent()) to fetch a parent node in a tree.
Another issue with Multiple Inheritance is that in practice multiple
inheritance is often unnecessary and rarely used correctly. More often
than not, it's bastardized and used as a form of consuming dependencies
as opposed to actually specifying inherent relationships.
More information about the Digitalmars-d
mailing list