Hacker News new | ask | show | jobs
by eeereerews 2179 days 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.

1 comments

Thanks! Always interested in learning more about the historical PL landscape ^_^