Generics is not "general java programming"
Please notice that this forumIS NOT for questions concerning
Java in general.
Please use the forum "Java Programming" for that!
http://forum.java.sun.com/forum.jspa?forumID=31
This forum deals with Java Generics, an extension of the java language to allow typed classes. (comparable to the c++ template mechanism). This allows constructs like ArrayList<String> f.e.
Best regards
DtN
You refer to my statement
Java Generics are
"comparable to the c++ template mechanism" ?
To make things clear:
I deliberately used the word "comparable" to emphasize the fact that C++ Templates are not the same like Java Generics, but both provide a mechanism to work with typed classes.
Best regards
DtN
> both provide a mechanism to work with typed classes
and that still isn't true. C++ provides a mechanism to generate and use 'typed classes'. Java provides you type-safe access to a single class which isn't 'typed' at all. Not at all the same thing and not at all comparable.
ejpa at 2007-7-14 21:37:26 >

Oh ejp,
we both know about type erasure in Java and preprocessor operation in C++.
Concerning my statement:
"both provide a mechanism to work with typed classes"
From the view of source code this is absolute true. (this is what I expressed in my first post, where I said "extension to the java language") And from that point, these language "extensions" are comparable. So please read precisely what I wrote!
From the view of compiled classes C++ and Java have nothing in common. But I have never asserted that!
Over and out! :o)
By the way, this discussion is a nice way to keep this topic on top of the list :=)