Why Generics?
- From: "David Blickstein" <db@xxxxxx>
- Date: Wed, 04 May 2005 18:36:18 GMT
In Java5, the powers that be added generics.
Can someone please explain to me what value they add to Java? I think they
are one of the biggest (of many big) mistakes in C++. And I always felt
that they only reason they were in C++ was because it made the huge mistake
of not having a common root for the entire class hierarchy: Java's Object
type.
Java didn't need any language features to implement container classes
because of this. An reference of type Object can hold ANY Object.
The biggest objection I've ever heard to that is it forces you to cast down
when you extract from the container. Big deal!
That's nothing compared to what I've always had to go thru to make generics
work in C++.
Am I missing something or did C++ weenies invade the language committee?
.
- Follow-Ups:
- Re: Why Generics?
- From: tzvika.barenholz@xxxxxxxxx
- Re: Why Generics?
- From: Robert Maas, see http://tinyurl.com/uh3t
- Re: Why Generics?
- From: Tor Iver Wilhelmsen
- Re: Why Generics?
- From: Ross Bamford
- Re: Why Generics?
- From: gwcherryHatesGreenEggsAndSpam@xxxxxxxxxxxx
- Re: Why Generics?
- From: Lasse Reichstein Nielsen
- Re: Why Generics?
- From: Mark Thornton
- Re: Why Generics?
- From: Eric Sosman
- Re: Why Generics?
- Prev by Date: Re: drag and drop javascript asp/php variable exchange
- Next by Date: BCEL and IfThenElse construct
- Previous by thread: Full Thread Dump
- Next by thread: Re: Why Generics?
- Index(es):
Relevant Pages
|