Comment by cubefox

13 hours ago

> But no one is actually confused.

Wrong, see this comment: https://news.ycombinator.com/item?id=48251896

Clearly he thought that it's the same kind of union as in TypeScript and that in C# just the syntax is weird. Which is not the case. Some others who are not commenting are probably also not aware of the two kinds of union types (or three, counting C separately).

> It's neither ambiguous nor confusing to use the word union in CS.

Well, we disagree.

I see no evidence the user is confused, they said they wished the syntax were similar to TS. Though they're not the same thing, they do have comparable uses, so it makes sense to wish for similar syntax to reduce cognitive overhead.

> Well, we disagree.

Most people here know the set theory definition of unions. It's simply a niche use, compared to the usual CS definition, which is the one used in the original article and now all the comments.

You're swimming upstream with a definition that doesn't reflect what is under discussion, which you decreed as though from on high, complete with the assertion that most people don't understand unions like you do. They do.

  • > they do have comparable uses, so it makes sense to wish for similar syntax to reduce cognitive overhead

    No this makes no sense at all. Set theoretic types don't use special constructors, there is no way to make them look remotely similar. He is clearly not aware that these are different kinds of unions.

    > They do.

    Nope, precisely because they are less common. You yourself also clearly also didn't understand the difference between "untagged unions" in C and set theoretic type systems.

    • Uh huh, sure. I didn't know the between a C union and a set theoretic union. I'm just so gosh darn confused, trying to use them set theoretical types in my C all the time!

      You have come into a room full of CS practitioners to announce to them that you alone understand what unions are. Never mind fifty years of industry practices and nomenclature - never mind the fact we all already know set theory and unlike you don't confuse set theoretic unions with tagged unions - all that can now be set aside because you discovered set theory last week and now no one understands unions except for you.

      Can't wait for next week when you discover some new band, and you'll be in here telling us how no one gets music except for you. :P