Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
om2
1y ago
0 comments
Save
Share
What’s the difference between a union type and a disjoint union type? In that C# proposal I couldn’t tell which syntax was which branch of your dichotomy.
0 comments
1 comments · 1 top-level
top
newest
oldest
noelwelsh
1y ago
disjoint union is sum type / enum / algebraic data type. Defined at the point of declaration. Each case is distinct (hence, disjoint)
union is what Typescript has. Defined at the point of use. Cases need not be distinct.
j
/
k
navigate · click thread line to collapse