You might be interested in Oleg's paper Haskell's Overlooked Object System, although programming in an object-oriented style is neither elegant nor idiomatic Haskell. Aside from the actual embedding of an object-oriented language inside Haskell, the main benefit of the paper is the opening survey of approaches to object-oriented style programming in Haskell. Not surprisingly, however, encapsulation and subtyping are the most difficult concepts from object-oriented languages to capture with Haskell type classes and algebraic data types.
Thanks Antoine,
At this point its academic ... I have programmed in OOPS for a long
> Is there a particular problem you're trying to solve? we might be able
> to take the conversation in a less speculative direction.
>
time so, I just wanted to understand how one would go around something
like that in Haskell.
I came across something called the expression problem and it talks
about "open data type" - is this the solution?
Regards,
Kashyap
_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners