[Haskell-cafe] H98, OOHaskell - getting started with objects in Haskell
Sean Leather
leather at cs.uu.nl
Wed Jan 12 23:27:52 CET 2011
Phil:
> I wanted to check whether Haskell offers reasonably easy object oriented
> programming
>
It depends on what you're looking for, but in general, you won't find the
same thing you may be used to in native OO languages.
1. OOHaskell doesn't seem to be available in the HackageDB (cabal) -- so how
> do I install it especially on Debian ?
>
The paper and source are available via links on the website:
http://homepages.cwi.nl/~ralf/OOHaskell/ . It appears that you could use
darcs with the new repository: http://code.haskell.org/OOHaskell/ .
2. is OOHaskell the right way to go - is it standardised (H98) or is it
> extension and is it widely used and recommended ?
>
It uses several language extensions beyond H98. AFAIK, it is not widely
used. It was an interesting demonstration of the potential of the Haskell
type system. I worked with it once, and it's nice research, but it hasn't
yet been shown to be useful in practice.
3. Haskell 98 offers datatypes and some sort of monadic classes -- is it
> possible to build simple objects without OOHaskell ?
>
4. When I want object properties to change, when should I use IORef when
> STRef ?
>
Once you become comfortable with Haskell, you will most likely find other
ways to do things than the OO way. If you ask questions on this list about
something you want to do, I'm sure you will get answers on how to do it the
functional way.
Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110112/af01aa1e/attachment.htm>
More information about the Haskell-Cafe
mailing list