3 ms·
> are called tagged unions in most other languages Not sure about that. Swift also calls them enums, in Java and Kotlin (and maybe Scala? I forget) they're sea
by Tainnor 2y ago
> are called tagged unions in most other languages
Not sure about that. Swift also calls them enums, in Java and Kotlin (and maybe Scala? I forget) they're sealed classes/interfaces and in PL theory and many typed FP languages they're called "sum types".
- pjmlp 2y agoVariant records in Pascal, and related linage language. Enumerations are a sequence of values.