
16 Oct
2008
16 Oct
'08
2:30 a.m.
Would you please explain this a bit more:
the various unfortunate consequences of type erasure in Java are avoided by the fact that Haskell types lack constructors, so the user never expects to be able to conjure up a value of an unknown type.
Even if Haskell had Java-style constructors, it wouldn't be a problem, since type classes exist independently from any object, so the code that needs the constructor will simply receive it in the corresponding dictionary. Stefan