[Haskell-cafe] H98, OOHaskell - getting started with objects in Haskell

Nick Rudnick joerg.rudnick at t-online.de
Fri Jan 14 22:42:39 CET 2011


Hi Philipp,

depending on what engineering calculations you are interested in, you 
might like http://timber-lang.org/ , a direct descendant of O'Haskell, 
targeted at embedded real-time systems.

If you are just stepping out of the OO programming world, it might be 
helpful to imagine OO as a rather narrow specialization of a concept 
called type, so that from the FP perspective it is just one of so many 
alternatives so that it gets lost a little -- which may be a useful 
translation to use.

So the short answer to "where's OO?" in Haskell might just be "data", 
while the expressive freedom of type classes / families might surprise 
you. There have been some people playing with cellular automata, Google 
helps, e.g.:

http://mjsottile.wordpress.com/
http://trac.haskell.org/gloss/

Both cases might give you an impression how it's done with Haskell types.

If you really are interested in using the OO class concept together with 
the Haskell type system by a more than practical motivation, an expert 
in the field who is interested in the subject for a long time is Peter 
Padawitz (http://fldit-www.cs.uni-dortmund.de/~peter/ 
<http://fldit-www.cs.uni-dortmund.de/%7Epeter/>); he has presented a 
beautiful synthesis based on category theory, swinging types 
(http://fldit-www.cs.uni-dortmund.de/~peter/Swinging.html 
<http://fldit-www.cs.uni-dortmund.de/%7Epeter/Swinging.html>). Of 
course, he did also use O'Haskell for his programming works in the past.

Cheers,

     Nick

On 01/14/2011 12:23 AM, gutti wrote:
> Hi,
>
> thanks for all Your answers (and again I'm amazed how active and good this
> forum is).
>
> I expected OOHaskell to be on the somewhat "extended" side, but I didn't
> expect it to be so uncommon.
> This very strong and clear feedback is indeed very valuable.
>
> I think I see the complexities of OO-programming in larger programs
> (unforeseen interactions), but I'm still doubtfull, that functional
> programming can equally adress all tasks equally efficient.
>
> I'm especially interestes in engineering calculation tasks where cellular
> automata could be used. In that case all u have to do is to give the class
> the right properties and that "let it grow".
>
> Such a localised intelligence approach seems an ideal OO - task. I don't
> know whether something functional could achieve the same.
>
> Sounds like a nice challenge. -- I'll chew on a small example.
>
> Cheers Phil




More information about the Haskell-Cafe mailing list