[1010] in java-interest
Re: Overloading & New
daemon@ATHENA.MIT.EDU (Terence John Parr)
Wed Aug 16 19:43:18 1995
Date: Wed, 16 Aug 1995 13:07:32 -0700
From: Terence John Parr <parrt@parr-research.com>
To: francois@coplanet.fr, gary@Intrepid.COM, java-interest@java.sun.com,
johnm@alumni.EECS.Berkeley.EDU
Uh oh...not templates. Templates are needed in C++ for really
two reason:
(i) lack of fully dynamic messages
In a language with fully dynamic messages, you don't need to specify
the type of the elements of a list, for example, you simply add what
you want to the list; further, you can have unrelated objects
in the list. There is no code bloat either in Java, which is
a *major* pain with C++ templates.
(ii) interfaces.
Interfaces allow you to say that certain objects conform to a
behavior but don't follow the is-a relationship of normal inheritance.
For example, a hash routine could be
add(Hashable key, Object value) {...}
where ANY object that answers the "hash()" message is conformant.
String and CarInfo are not correctly linked with inheritance (is-a),
but certainly behave the same way--interface==good, inheritance==bad
in this case.
PLEASE:
All C++ people please go back to C++ and quit trying to turn Java
into an interpreted C++. Gawd!!! This is ridiculous!
Templates are a total nightmare to implement/get-right in C++.
If you haven't learned your lesson with C++, you deserve each other.
Terence
I'm not beligerent, I just can't believe people want to turn Java into
C++ when C++ already exists; Java != C++.
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com