[Haskell-cafe] Type system

Andrew Coppin andrewcoppin at btinternet.com
Fri Mar 14 14:50:18 EDT 2008


Haskell has an expressive and powerful type system - which I love. It 
also has a seemingly endless list of weird and obscure type system 
extensions. And there are various things you can do in Haskell which 
*require* some pretty serious type system hackery.

And yet, none of this happens in any other programming language I've 
met. Take Java for example. In Java, a "type" is just an identifier. It 
has no further structure than that. It does have the added semantics 
that it refers to that class *or any subclass*, but that's about it. 
Even taking an extreme example like Eiffel [which supports generics], 
complex types are extremely rare.

And yet they commonly pop up in Haskell. Can anybody put their finger on 
precisely why that is?

Is it because Haskell is used by more PhDs? Is it because Haskell 
actually allows you to implement constructs that are impossible in other 
languages? Is it because Haskell really provides greater type safety? Is 
it something else?

Not trying to suggest that either system is "superior", I'm just curios 
as to the origin of the difference...



More information about the Haskell-Cafe mailing list