3 ms·
The main difference is the totality checking. A discriminated union guarantees that you've handled the entire modelled domain (and nothing else); repeated inter
by Smaug123 3y ago
The main difference is the totality checking. A discriminated union guarantees that you've handled the entire modelled domain (and nothing else); repeated interface checking merely guarantees that you've handled a subset of it (and also you may have handled a bunch of other stuff).
It's so comforting to know up front that you've done everything you need to do!