The Expression Problem

June 1st, 2007 by Wouter

Phil Wadler defines the expression problem as:

The goal is to define a data type by cases, where one can add new cases to the data type and new functions over the data type, without recompiling existing code, and while retaining static type safety.

I talked a bit about how one might go about tackling Phil Wadler’s expression problem in Haskell. It requires quite a bit of type class trickery, but nothing too nasty. I’m hoping to write something more substantial about this some time soon: watch this space!

Leave a Reply