Re:Algebraic Data Types for C99
by mpawelski on Thursday May 09, 2024 @11:37AM
(#40309333)
Supports exhaustiveness checks only if you explicitly opt-in it (by coding to pattern where you use helper function that accepts `never` type). "Dicriminated Unions Type"/"Sum Types" feels very hacky there, at least syntax-wise, because it is constraint by being "JS + types" language. It's remarkable what Typescript can do, but having native Discriminated Unions in JS (hence in TS too) would be much more ergonomic and powerful.
[ Parent
| on HN ]
There are no comments on this comment yet.