3 ms·
The problem you are referring to is called the expression problem [0]. There are solutions, such as the Visitor Pattern, but these tend to increase complexity s
by Anchor 12y ago
The problem you are referring to is called the expression problem [0]. There are solutions, such as the Visitor Pattern, but these tend to increase complexity substantially. Functional programming has approached this from the other side by introducing something called protocols [1].
[0] http://c2.com/cgi/wiki?ExpressionProblem http://c2.com/cgi/wiki?ExpressionProblem
[1] http://www.ibm.com/developerworks/library/j-clojure-protocols/ http://www.ibm.com/developerworks/library/j-clojure-protocol...