[Haskell-cafe] Subsets and supersets

Henning Thielemann schlepptop at henning-thielemann.de
Mon Mar 21 21:12:50 CET 2011


Andrew Coppin schrieb:

> Haskell has ADTs. Most of the time, these work great. As I've written in
> several other places (but possibly not here), OO languages tend to
> "factor" the problem the other way. That is, if I want a binary tree, an
> OO language makes me split the type and all of its operations into three
> parts (an abstract base class, a branch subclass, and a leaf subclass).
> Adding each new operation requires adding an abstract version of it to
> the abstract base class, and putting half of the implementation into
> each concrete subclass.

I think, that's known as the 'expression problem'.
  http://en.wikipedia.org/wiki/Expression_problem



More information about the Haskell-Cafe mailing list