News for hackers. Stuff that matters.
Re:Type erasure and reification by dllthomas on Wednesday December 05, 2018 @12:00PM (#18610094)
> Contrary to popular belief, Java's choice of erasure was not dictated by backward compatibility concerns but because erasure is a sound approach for type system representation.

Do you have evidence for the "because"? I agree that erasure is a sound approach for type system representation when designing a language, but I thought that backwards compatibility was explicitly a concern in the case of Java.

Also, that good languages can be built with type erasure doesn't mean it's a good fit for the Java context where the runtime is doing a lot of dynamic dispatch based on tags that now only represent a part of the type.

Re:Type erasure and reification by hota_mazi on Thursday December 06, 2018 @12:04AM (#18615565)
> Do you have evidence for the "because"? I agree that erasure is a sound approach for type system representation when designing a language, but I thought that backwards compatibility was explicitly a concern in the case of Java.

When the debate was raging around 2004 when generics were being discussed, Neal Gafter offered a proposal of a reified JVM that would maintain backward compatibility.

Erasure was ultimately chosen over that proposal.

Backward compatibility was not the issue: technical soundness was.