[Haskell-cafe] OO Design in Haskell Example (Draft)

Bulat Ziganshin bulat.ziganshin at gmail.com
Mon Feb 26 04:44:50 EST 2007


Hello Tim,

Monday, February 26, 2007, 2:26:44 AM, you wrote:

> Rather than using existential types, a simple record of
> functions can be often be useful. ie:

> data Component = Component {
>     draw :: String
>     add  :: Component -> Component
> }

Steve, you can look at the pages
http://haskell.org/haskellwiki/OOP_vs_type_classes
http://haskell.org/haskellwiki/IO_inside
which describes some alternatives to OO approach used in functional
programming world and Haskell in partial. because first page is just
about switching from OOP to Haskell, you may consider adding to this
page patterns you've designed

-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list