People want sum types because sum types solve a large set of design problems, while being a concept old enough to appear back in SML in 1980s. One of the best phrased complaints I've seen against Go's design is a claim that Go language team ignored 30+ years of programming language design, because the language really seems to introduce design issues and footguns that were solved decades before work on it even started
People want sum types because sum types solve a large set of design problems, while being a concept old enough to appear back in SML in 1980s. One of the best phrased complaints I've seen against Go's design is a claim that Go language team ignored 30+ years of programming language design, because the language really seems to introduce design issues and footguns that were solved decades before work on it even started
Rust did not exist in 1976.
ML did, however (1973), and had..... sum types!
Yes, and still doesn't change the fact that Go messed up.
Sum types are not the same as the trivial example above. Sum types are actually useful, for one thing.
No one is asking for sum types, what Pascal does would already be a huuuuge improvement.
But I guess Go devs love to type their beloved boilerplate, it gives fuzzy feelings.
It wouldn't move the needle at all except people looking to nitpick.
And concretely, _I_ want Sum types in Go. I also want them in C# and every other language I might have to use.