Mon Aug 28 17:35:08 CEST 2006

the expression problem

something i ran into when reading lut:


"In object-oriented languages, it is easy to extend data by defining
new classes, but it is difficult to add new functions. In functional
languages, the situation is reversed: adding new functions poses no
problems, but extending data (adding new data constructors) requires
modifying existing code. The problem of supporting both directions of
extensibility is known as the expression problem."

Looks like what i'm trying to accomplish is very much related to this.

Some bones to chew on before diving into the theory: are binary
operations enough? Unary operations are really just object
methods. For what i need them, can i assume i can construct multi-ary
operations from binary ones?