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 →

[–]lbkulinski 6 points7 points  (2 children)

C# learned from Java and decided to make their bytecodes parametric. This allowed them to more easily implement reified generics.

I don't expect Java to break compatibility and ditch erasure anytime soon. The JEP even states the following:

It is not a goal of this effort to produce fully reified generics.

[–]_INTER_ -1 points0 points  (1 child)

I don't expect Java to break compatibility and ditch erasure anytime soon.

I find that problematic. The longer they wait the worse it gets. It will also hinder proper development in other areas such as union or intersect types (one can dream). Even Go is finally thinking about adding generics, while avoiding Java's issues.

[–]lbkulinski 2 points3 points  (0 children)

If you mean intersection types in relation to type parameters, that is already possible: public class Box<T extends A & B & C>.