Remix.run Logo
813ac4312b25c 4 days ago

[flagged]

chiffaa 4 days ago | parent | next [-]

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

pjmlp 4 days ago | parent | prev | next [-]

Rust did not exist in 1976.

jen20 4 days ago | parent [-]

ML did, however (1973), and had..... sum types!

pjmlp 4 days ago | parent [-]

Yes, and still doesn't change the fact that Go messed up.

jen20 4 days ago | parent | prev [-]

Sum types are not the same as the trivial example above. Sum types are actually useful, for one thing.

pjmlp 4 days ago | parent [-]

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.

jen20 3 days ago | parent [-]

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.