Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
kaba0
· 3y ago · 0 comments
You can have both union types and sum types (imo ideally), or in this case can easily choose to represent the result of the expensive computation in a more reasonable/descriptive way.
Comments
[–]
codebje
3y ago
Perhaps the more reasonable/descriptive way to represent the potentially no-value result of the computation is with a sum type, not a union type?