Hacker News new | comments | show | ask | jobs | submit login

I meant breaking in that the Java 10 compiler would be targeting a newer version of the JVM and could dispense with having to be backwards compatible, which was one of the reasons I remember reading for generics.

They could have simply left the old library, deprecated it, and added in their genericed one as a a new package. It had to be modified anyway.

Right, it breaks forward compatibility: bytecode for a newer VM won’t work on an older VM. IMO backward compatibility is much more important for a programming language, though.

Or they could have done erasure in the runtime when they detected non-generic usage of a generic class. Instead of forcing it on everyone.

Yup, and Microsoft did exactly that, meaning C# has been able to express List<int> for ten years now.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact