> The sum type, which the author is talking about, is not the same as "discriminated union" pattern, the latter being the crude implementation of the former.
Could you say something about the difference between the two? I'm not aware what it is.
IIRC discriminated unions are plain C(++) unions with an added type tag, like at the beginning of the article. Brittle, prone to breakage when refactoring, etc. when compared to real sum types.
Could you say something about the difference between the two? I'm not aware what it is.
Edit: wow I accidentally a word.