Concept

Union type

Modified just now
Books JourneyProgramming Language Theory Statusmastered Tags
  • language-feature-design
  • type theory

Union type: An untagged, ad-hoc combination of existing independent types (e.g., (U mt node)) - unlike Sum type (Algebraic data type) where Type variant are tagged and defined together as part of one

Union type: An untagged, ad-hoc combination of existing independent types (e.g., (U mt node)) - unlike Sum type (Algebraic data types) where Type variant are tagged and defined together as part of one type.