[Haskell-cafe] Re: Type system
Ben Franksen
ben.franksen at online.de
Fri Mar 14 17:37:57 EDT 2008
Andrew Coppin wrote:
> 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?
I think this is at least partly because Haskell takes being a (typed)
functional language very serious. With OO languages, such as Java or
Eiffel, you can swipe a lot of the complexity under the stateful object
carpet. Functional programs explicitly operate on values, however complex
their types may be... and thus themselves become values with even more
complex types... I found this paper
http://www.eecs.usma.edu/webs/people/okasaki/pubs.html#jfp98 quite
illuminating (it uses SML, not Haskell, which rather confirms my point).
Cheers
Ben
More information about the Haskell-Cafe
mailing list