D
Darryl L. Pierce
EJP said:I could go on. It's entirely clear that C++ templates *generate new
types*. Every template class is a new class, and the template itself is
not a class at all. A Java generic is a type-constrained notation for a
single class.
And it still an implementation detail of how the concept (about which is
what I spoke originally) is fulfilled, the concept being to write code
in a very generic way. C++ generates a whole new class while Java
doesn't, but that's immaterial to them both sharing the same concept. So
my original statement:
---8<[snip]---
sarathy said:> Is there any relation between the J2se 5.0 generics and
> C++ templates ??
Not really, no, except in concept.
---8<[snip]---
is spot on true. I don't understand why you think that C++ generating a
new type while Java doesn't somehow means that conceptually the two
aren't at all similar...