[Haskell-cafe] Re: I/O interface

Andre Pang ozone at algorithm.com.au
Thu Jan 20 06:42:16 EST 2005

On 20/01/2005, at 3:42 AM, Keean Schupke wrote:

> Have you read the OOHaskell paper?
>    http://homepages.cwi.nl/~ralf/OOHaskell/
> This shows how to encode many OO idioms in Haskell, without any 
> extensions
> (beyond those that GHC already supports)... Here's some sample code
> (from the Shapes.hs example) to give you a flavor of it:
> [..]

Just because you can encode the OO idioms in Haskell doesn't mean it's 
particularly straightforward to use them.  As your example shows, 
getting the syntax right for these OOish constructs isn't easy (not to 
mention verbose), and even so, the type errors you face when you get 
things wrong are, well, long :).

I guess my point is that in theory, Haskell can support OO right now.  
In practice, it's something that isn't very tasty.

% Andre Pang : trust.in.love.to.save  <http://www.algorithm.com.au/>

More information about the Haskell-Cafe mailing list