3 ms·
All they need to do at this point is allow type union interfaces to be used as regular types and not just generic type constraints.
by int_19h 2y ago
All they need to do at this point is allow type union interfaces to be used as regular types and not just generic type constraints.
- kubb 2y agoAnd modify the switch statement to be able to ensure that all variants are handled.
- carlmr 2y agoExactly, since messing around with OCaml/F#/Rust I feel like sum-types + exhaustive match (with deconstruction) is such a powerful construct to prevent logic errors and ensure maintainability, that every language without it feels so limited.
- valenterry 2y agoYep, one of the reasons I could never be happy with Go. Union types and type-classes are of similar importance. Any modern language not having them (or an equal powerful feature) just feels sad.