News for hackers. Stuff that matters.
Re:Type erasure and reification by dtech on Wednesday December 05, 2018 @12:24PM (#18610329)
> 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.

This is false. I cannot find the source at the moment, but in a talk about implementing improved lambda support in Java 8 a Java compiler dev clearly labeled type erasure as technical debt they have to work around.

It frequently bites them when they try to implement new things, and causes weird interaction with new language features they have to work around.

Re:Type erasure and reification by jayd16 on Wednesday December 05, 2018 @04:27PM (#18612756)
In other talks Java language devs mention it as a conscious design choice.
Re:Type erasure and reification by Someone on Wednesday December 05, 2018 @05:02PM (#18613088)
Reading JSR-14 (https://download.oracle.com/otndocs/jcp/7566-generics-0.1-pr...), it was a conscious choice:

”Supporting generic types at run time seems undesirable for the following reasons:

- Lack of experience with such constructs in widely used languages

- Burden of extensive VM changes on vendors throughout the industry

- Increased footprint on small devices

- Decreased performance for generic methods

- Compatibility”

However, that doesn’t rule out it is technical debt, too. “Conscious design choice” and “technical debt” do not rule out each other.

Re:Type erasure and reification by merb on Wednesday December 05, 2018 @12:51PM (#18610624)
well to be fair, with this debt they came up with something really useful. indy and lambdametafactory