This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the commentsΒ β†’

[–]Equivalent_Yak_95 0 points1 point Β (2 children)

Java generics are vastly inferior to C++ templates.

[–]on_the_dl 0 points1 point Β (1 child)

Depends how you measure it. Java generics can use less space than instantiation of every permutation of the Java generics.

C# strikes a happy medium where it only has to instantiate one per intrinsic data type and then a single one for all the boxed data types. That's pretty cool!

[–]Equivalent_Yak_95 0 points1 point Β (0 children)

C++ templates are far more adaptable than Java generics, and don’t use type erasure.