[1027] in java-interest

home help back first fref pref prev next nref lref last post

Re: Overloading & New

daemon@ATHENA.MIT.EDU (Michael Lorton)
Thu Aug 17 02:36:27 1995

Date: Wed, 16 Aug 1995 19:14:36 -0700
From: Michael Lorton <mlorton@eshop.com>
To: java-interest@java.sun.com
In-Reply-To: Terence John Parr's message of Wed, 16 Aug 1995 13:07:32 -0700 <199508162007.NAA06322@lonewolf.parr-research.com>


> Uh oh...not templates.

Verily, template are most lame.

> 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

It isn't just the language.  The PROGRAMMER needs to specify the type
of the elements of a list.  It is a simple matter of verifiability.
It is the same reason that you specify type in the argument-list of a
function.

If I were king of the forest, the Vector class and other classes like
it would take a class-object (or an interface-object) as an argument
to the constructor; any attempt to add an object which was not an
instance of the class would result in an exception.

In those (extremely rare) cases where you needed pencil-cup (as we
used to call fully heterogeneous containers), you would specify "Object"
as the restricting class.

> (ii)	interfaces.

Amen.  Interfaces do correctly was templates try to do.

> If you haven't learned your lesson with C++, you deserve each other.
> Terence
> I'm not belligerent

N'est pas une pipe.

> Java != C++.

I see you like operator-overloading  :-)

M.
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post