4 ms·
The "expression problem" from Wikipedia (quoting Phil Wadler): "The expression problem is a new name for an old problem. The goal is to define a datatype by ca
by willtim 6y ago
The "expression problem" from Wikipedia (quoting Phil Wadler):
"The expression problem is a new name for an old problem. The goal is to define a datatype by cases, where one can add new cases to the datatype and new functions over the datatype, without recompiling existing code, and while retaining static type safety (e.g., no casts)."
With a sufficiently expressive language, the expression problem can be solved, sometimes in multiple ways. However, the solutions often involve boilerplate, trickery or advanced type system features. A proposed solution to the expression problem may be impractical, but that is subjective and really a separate discussion.
I guess you could view the problem as a sort of lens with which to evaluate a language. E.g. Can this language solve the expression problem and what does the best solution look like?
- qppo 6y agoThis this just different parlance to describe type constructors or am I missing something?
- DonaldPShimoda 6y agoOh true! I've definitely read that definition before but I guess I just internalized it with a lossy interpretation. :) Thanks for reminding me what it was really about!