5 ms·
Java has generics for one. Failed generics with type-erasure sure, but definitely better than Go which has nada.
by josteink 9y ago
Java has generics for one.
Failed generics with type-erasure sure, but definitely better than Go which has nada.
- leshow 9y agoType erasure on it's own isn't necessarily a bad thing, Haskell implements type erasure also.
- unscaled 9y agoI guess this was your point, but the problem is how Java does does type erasure. With Haskell type erasure is an implementation detail, but with Java it leaks into the compile-time type checker. For instance, you can't have both these overloads: public void foo(List<String> list) public void foo(List<Integer> list) This just wouldn't compile.
- masklinn 9y agoThe difference is that Haskell has very little RTTI, so you can't really see the missing types at runtime. For Java it's much more noticeable, because runtime type manipulations are way more common.