News for hackers. Stuff that matters.
Re:Algebraic Data Types for C99 by akavi on Thursday May 09, 2024 @03:37PM (#40312147)
As you've demonstrated, you can always construct sum types in typescript with the use of explicit discriminants:

    T = {tag: "L", payload: L} | {tag: "R", payload: R}
The real issue is typescript doesn't have pattern-matching, which make operating on these sum types inelegant

There are no comments on this comment yet.