Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
willtim
· 9y ago · 0 comments
Unfortunately OOP languages typically lack sum types, the mathematical dual of product types (objects with just fields). This means subtyping and inheritance is often needed to encode sum types.
Comments
[–]
mbrock
9y ago
In functional languages it's easy to run into difficulties with extending a sum type without changing the defining module.