Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
om2
1y ago
0 comments
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
default
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