7 ms·
Historically imperative languages did have tagged unions (Algol, Pascal, Ada, Modula). Their disappearance is mostly because of OOP's takeover I think. It was t
by eeereerews 6y ago
Historically imperative languages did have tagged unions (Algol, Pascal, Ada, Modula). Their disappearance is mostly because of OOP's takeover I think. It was thought that a tagged union should be replaced by a base class with one derived class per variant.
What they lacked was usually a nice way to operate on tagged unions, ie. pattern matching.
- Twisol 6y agoThanks! Always interested in learning more about the historical PL landscape ^_^