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

[439 byte] By [DoodleTheNoodlea] at [2007-10-3 3:41:35]
# 1
Agreed, except that the comparability of Java Generics to the C++ template mechanism goes no further than the dreadful <> syntax.
ejpa at 2007-7-14 21:37:26 > top of Java-index,Core,Core APIs...
# 2
Hey ALL,COULD you PLEASE use this forum forJava Generics ONLY!!!ThxDtN
DoodleTheNoodlea at 2007-7-14 21:37:26 > top of Java-index,Core,Core APIs...
# 3
I agree completely.Since when does that mean that mis-statements here about Java Generics can't be corrected?Even if they come from you ...
ejpa at 2007-7-14 21:37:26 > top of Java-index,Core,Core APIs...
# 4

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

DoodleTheNoodlea at 2007-7-14 21:37:26 > top of Java-index,Core,Core APIs...
# 5

> 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 > top of Java-index,Core,Core APIs...
# 6

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 :=)

DoodleTheNoodlea at 2007-7-14 21:37:26 > top of Java-index,Core,Core APIs...
# 7
It all depends on what you mean by 'typed classes'. As this can only mean different things in C++ and Java the statement isnt' very useful.
ejpa at 2007-7-14 21:37:26 > top of Java-index,Core,Core APIs...
# 8
I Agree!Typed classes is somehow misleading. But if our target is source code view then it is okay to speak of "typed classes".Have fun!
DoodleTheNoodlea at 2007-7-14 21:37:26 > top of Java-index,Core,Core APIs...
# 9
As long as you don't mislead anybody.
ejpa at 2007-7-14 21:37:26 > top of Java-index,Core,Core APIs...