David LaFrance-Linden wrote:
> Single-inheritance
> (Java, F2K, Smalltalk) is a simple conceptual model.
As you might already know, Java offers "interfaces" as a substitute for
multiple inheritance. Basically, you can say that a given object implements a
certain set of methods. But no data is present, so how many copies of an
object is no longer a problem.
This is all nice and dandy put the problem is efficiency. Since you cannot put
data in an interface, all access to data must be done via member functions.
Though C++ or Java or whatever mongers may praise this, I believe that it is
essential to provide direct access to data, especially if we are talking
about arrays. How else can the compiler really do its optimization magic? So
I am not a fan of this approach for Fortran...I would be happy to hear ideas
though (OK, I already heard the "Single-instance-of-grand*parent multiple
inheritance" idea) on what would be "useful".
Best,
Aleksandar
|