According to Pierre Phaneuf:
I strongly advises *agains't* multiple inheritance. It is the OOP 'goto' equivalent. Everything MI can do, you can do without MI if you design well. C++ is the bloated monster we know today in part because of that pseudo-feature. Neither Modula-3 or Oberon has multiple inheritance and both have been used in programming operating systems and huges projects.
I don't vote for or against multiple inheritance, but
* are there existing Pascal standards (ANSI Object Pascal, Delphi) requiring it? (I *really* don't know.)
* There are few places in my planned object hierarchy (I am *also* working on a completely new library;) where MI could be useful: There are several independent branches of recursive objects, say `VisibleObj' and `DataObj', which all have a `Child ( i: Integer )' method returning the `i'th child. It would be nice to implement some stuff, say a `ForEach' method, in a common ancestor. Without MI, this common ancestor must be a *very* "low" object, `BaseObj' itself, the parent of all objects. I am not sure if it is wise to make *every* object in the hierarchy potentially recursive.
* Whether we want to use it or not, I would like to think about how to implement it due to academical curiousity.
(* And: C++ has it, and we must demonstrate that GPC is not inferior. ;*)
Greetings,
Peter
Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [970201] maintainer GNU Pascal [970510] - http://home.pages.de/~gnu-pascal/ [970125]
On Wed, 28 May 1997, Peter Gerwinski wrote:
- are there existing Pascal standards (ANSI Object Pascal, Delphi) requiring it? (I *really* don't know.)
None.
- There are few places in my planned object hierarchy (I am *also* working on a completely new library;) where MI could be useful: There are several independent branches of recursive objects, say `VisibleObj' and `DataObj', which all have a `Child ( i: Integer )' method returning the `i'th child. It would be nice to implement some stuff, say a `ForEach' method, in a common ancestor. Without MI, this common ancestor must be a *very* "low" object, `BaseObj' itself, the parent of all objects. I am not sure if it is wise to make *every* object in the hierarchy potentially recursive.
Check this out a bit more, I'm sure you'll find out you can do without, and inevitably, you'll probably find out it is cleaner without multiple inheritance.
- Whether we want to use it or not, I would like to think about how to implement it due to academical curiousity.
Quite complex. Conflicting methods and properties have to be taken care of, I still don't know how this is done in C++!
(* And: C++ has it, and we must demonstrate that GPC is not inferior. ;*)
Not having it IMHO is a demonstration of superiority. ;-)
Both Oberon and Modula-3 have been used to build extremely complex operating systems and windowing libraries (in Modula-3's case, a fabulous multithreaded system that literally kicks the ass of any C++ windowing toolkit you have ever seen!), all *without* multiple inheritance.
Pierre Phaneuf
"The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offense." - Edsger W. Dijkstra.