[1087] in java-interest
Re: Assertions in Java (& more)
daemon@ATHENA.MIT.EDU (John Barton)
Fri Aug 18 12:25:31 1995
To: "John D. Mitchell" <johnm@CSUA.Berkeley.EDU>
Cc: anders@in.otc.com.au, java-interest@java.sun.com
In-Reply-To: Your message of Thu, 17 Aug 1995 14:30:19 PDT.
<199508172130.OAA13990@soda.CSUA.Berkeley.EDU>
Date: Fri, 18 Aug 1995 08:58:29 -0400
From: John Barton <jjb@watson.ibm.com>
John D. Mitchells writes:
>MI, as it's is in e.g., C++ and Eiffel, blends the notion of the
>inheritance of the implementation with the inheritance of the API (or just
>plain 'interface'). This intertwinedness causes a number of painful
>problems. By splitting those two concepts apart we can gain a lot back in
>terms of performance, understandability, precision of expression, etc.
This statement as applied to C++ is false. C++ supports derivation from
interface base classes containing no implementation. C++ supports
derivation from implementation base classes with or without interfaces.
C++ supports arbitrary combinations of these kinds of classes.
"Intertwinedness" is a property of code you may have read, not a property
of C++; splitting interface from implementation is a standard programming
practice in C++.
>Java only has single inheritance (SI) of implementation but supports
>MI of interface (MII). This gives Java the ability to do the sorts of
>things that people really, mostly want out of MI in e.g., C++.
>As Terence has pointed out, modelling classes in C++ using the is-a
>relationship that comes with C++ MI is just plain wrong. But in C++ you
>have no other choice (well, delegation but that's just making the problem
>into a manual issue).
This statement as applied to C++ is false. The construct of separating
interface from implementation is easily used in C++.
For the record, I have no interest in seeing Java emulate C++.
John.
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com