4 ms·
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.
by masklinn 6y 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.
- ccktlmazeltov 6y agoBut you don't need to, generic Option and Result types could be built as part of the standard library.
- masklinn 6y agoYes 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).
- ccktlmazeltov 6y agosum types are still super useful imo without generics.