I only skimmed the article but it looks like he is more or less talking about the expression problem brought up by Philip Wadler some time ago. Definitely multiple dispatch can solve this problem but if we stick to the original definition of the problem it breaks on the requirement for static type safety (which probably doesn't matter to you heh).
GADTs in haskell and I think Scala can solve this cleanly. Active Patterns in F# may also provide a clean solution for the full problem.
Yes, you can solve it quite simply with an active pattern, or type union. The fundamental problem with the problem is that it's a relational problem and polymorphism largely solves hierarchical problems. This type of problem also solves easily in prolog. The solution to the problem in java is to create some kind of relation class that abstracts the state of the relationship to between individuals/groups.
GADTs in haskell and I think Scala can solve this cleanly. Active Patterns in F# may also provide a clean solution for the full problem.
reply