3 ms·
It seems like most more modern languages actually have facilities for expressing proper sum types (even if it is in some languages more verbose than in others).
by Tainnor 4y ago
It seems like most more modern languages actually have facilities for expressing proper sum types (even if it is in some languages more verbose than in others).
Certainly Kotlin, Swift, Rust, etc. do have them. Even Java, I believe, is planning to add them, though I suspect that many people won't necessarily understand why they're useful even when they land.
It's probably helped by functional programming becoming more mainstream and "obvious" sum types needing to be implemented (Optional and Result, mostly).