News for hackers. Stuff that matters.
Re:Dr. Software: An unfinished journey starting from dirty c... by mscuwa on Monday June 28, 2021 @03:21PM (#27666501)
> If you're not careful (or if you're trying to be clever), you can insert a String into an object that had been declared to be a List<Integer>

It's less about type erasure and more about missing covariance/contravariance in Java generics. Scala also has type erasure in generics (same JVM), but won't allow that (unless you explicitly upcast). HM doesn't recognize inheritance, so it's in a completely different category.

There are no comments on this comment yet.