Deriving Dependently-Typed OOP from First Principles -- Extended Version with Additional Appendices
View PDF
Abstract:The expression problem describes how most types can easily be extended with new ways to produce the type or new ways to consume the type, but not both. When abstract syntax trees are defined as an algebraic data type, for example, they can easily be extended with new consumers, such as print or eval, but adding a new constructor requires the modification of all existing pattern matches. The expression problem is one way to elucidate the difference between functional or data-ori...
Read more at arxiv.org