Y
Hacker News
new
|
ask
|
show
|
jobs
by
masklinn
2192 days ago
Non-generic sum types are useful but you can’t build an option or result type out of them, so the usefulness is somewhat hampered.
1 comments
ccktlmazeltov
2191 days ago
But you don't need to, generic Option and Result types could be built as part of the standard library.
link
masklinn
2190 days ago
Yes but then you need neither sum types nor user-defined generics, you can just build-in whatever sugar is useful or necessary (possibly repurposing existing sugar e.g. the `select` statement).
link
ccktlmazeltov
2188 days ago
sum types are still super useful imo without generics.
link