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
Steve Downey wrote:
In the last OO design in Haskell thread (and probably in every one
preceeding it), it was suggested that having some examples might be a good
idea.
Since most people with existing designs will have some familiarity with
Design Patterns, and those are typical building
In the last OO design in Haskell thread (and probably in every one
preceeding it), it was suggested that having some examples might be a good
idea.
Since most people with existing designs will have some familiarity with
Design Patterns, and those are typical building blocks for OO designs, it
Steve Downey wrote:
So, I've been working on a Composite example. I've used
existential types to have a generic proxy to the base
type, rather than a simple algebraic type, since adding
new leaves to the algebraic type means modifying the whole
type, a violation of the Open-Closed