Comment

Comment by eeereerews

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.

parent eeereerews 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton