3 ms·
Sum types and Generics solve different but related problems. So they are not really comparable. I would like to see both get implemented.
by qtplatypus 6y ago
Sum types and Generics solve different but related problems. So they are not really comparable. I would like to see both get implemented.
- ccktlmazeltov 6y agoI'd say it's really hard to abuse sum types, I wouldn't say the same of generics.
- qtplatypus 6y agoThat is true. However sum types don't allow us to abstract over common code. For example a sum type wouldn't allow us to create a type safe channel "fan in" function that works for all channel types.