Re:Tagged Unions Are Overrated
by jasperry on Friday February 19, 2021 @08:40AM
(#26193011)
I think the best solution to this is when the language's syntax supports ORing cases together like this:
So you still get to avoid repeating code, but all the variants are included visibly and the compiler can verify it.
[ Parent
| on HN ]
There are no comments on this comment yet.