Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
om2
on Nov 1, 2024
|
parent
|
context
|
favorite
| on:
Sets, types and type checking
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.
noelwelsh
on Nov 1, 2024
[–]
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.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: