3 ms·
Are union/sum types another "basis"? Some languages include syntax for them at the level of structs, others require they be painfully hacked together out of lib
by nyanpasu64 3y ago
Are union/sum types another "basis"? Some languages include syntax for them at the level of structs, others require they be painfully hacked together out of libraries and template metaprogramming (std::variant, though bare unions exist without carrying a tag).
- mayoff 3y agoI also thought this was a major omission. After using languages with well-supported sum types (mainly Swift and Elm), I find it painful to go back to languages that lack native support.
- jetsetsushi 3y agoIf lists and structures are basis then sum should be too.