Programming/Language/Concept/Type/Nominal
Properties
- tags
- Term
- alias
- Nominal Typing
Nominal typing
- Nominal typing assigns a type to a value because the type was declared to implement Vehicle, not merely because it has
wheelCountandhonk. - Shorthand: you count as a
Vehiclebecause you declared conformance. Conformance is name-based and usually explicit. - That is the usual setup for interface-style abstractions in Java-like stacks:
CarimplementsVehicle,extendsa trait,impl Vehicle for Truck, and similar. Languages
Nominal vs structural
Terminology
- Nominal typing assigns a type to a value because the type was declared to implement Vehicle, not merely because it has