Re: [Haskell-cafe] State of OOP in Haskell

deliverable:
Well, I'm thinking in terms of OOD/OOA/OOP -- Design, Architecture, Programming. That's about the only way to model a bog system. Say I have a stock market model -- I'll have a database of tickers, a simulator to backtest things, a trading strategy, etc.
Do Haskell modules provide enough encapsulation to design a system in terms of them? What are the design/architecture units in Haskell if not OO-based?
Haskell's pretty big on encapsulation (we like our strong statically checked guarantees after all) Some of the encapsulation mechanisms used in large (>5k loc up to 100k + Haskell programs I've hacked on): modules qualified modules type classes to specify generic interfaces existential types to hide implementations completely (and statically) existentials using typeclasses to package the interface monads for state/effect encapsulation abstract data types data types with smart constructors first class modules via existentials purity laziness So the same kind of encapsulation as OO stuff provides (existentials are essentially OO objects), and a few more besides. Monads in particular are perfect for encapsulating interesting effects, and having that encapsulation statically enforced. Probably some of the OO refugees can think of other mechanisms. Cheers, Don

What about this OOHaskell: http://homepages.cwi.nl/~ralf/OOHaskell/ -- how is it received in the café? :) Cheers, Alexy

OOHaskell is ingenious, but it's a terrible way to use Haskell. It's very unidiomatic Haskell, and it makes you do things in the same old OO way. Presumably people are using Haskell to do things differently? But as I said, I consider OOHaskell itself a work of genius. :) -- Lennart On Jan 27, 2007, at 22:24 , Alexy Khrabrov wrote:
What about this OOHaskell:
http://homepages.cwi.nl/~ralf/OOHaskell/
-- how is it received in the café? :)
Cheers, Alexy _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

And OOHaskell didn't compile for me on GHC 6.6... tells you about
currency of use.
On 1/28/07, Lennart Augustsson
OOHaskell is ingenious, but it's a terrible way to use Haskell. It's very unidiomatic Haskell, and it makes you do things in the same old OO way. Presumably people are using Haskell to do things differently? But as I said, I consider OOHaskell itself a work of genius. :)
-- Lennart
On Jan 27, 2007, at 22:24 , Alexy Khrabrov wrote:
What about this OOHaskell:
http://homepages.cwi.nl/~ralf/OOHaskell/
-- how is it received in the café? :)
Cheers, Alexy _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Lennart wrote:
OOHaskell is ingenious, but it's a terrible way to use Haskell. It's very unidiomatic Haskell, and it makes you do things in the same old OO way.
It's probably obvious but let me say that ... OOHaskell is more of a proof of concept and a sandbox for OO language design. It is not a serious proposal for actual OO application development. Alexy wrote:
And OOHaskell didn't compile for me on GHC 6.6... tells you about currency of use.
I know a few people trying to use it. :-) Oleg and I were distracted but will update OOHaskell for 6.6 soon. Ralf
participants (4)
-
Alexy Khrabrov
-
dons@cse.unsw.edu.au
-
Lennart Augustsson
-
Ralf Lammel