[Haskell-cafe] Re: What I wish someone had told me...
Stefan Monnier
monnier at iro.umontreal.ca
Wed Oct 15 22:30:12 EDT 2008
> 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
More information about the Haskell-Cafe
mailing list