News for hackers. Stuff that matters.
Re:Typical: Data interchange with algebraic data types by stepchowfun on Sunday May 21, 2023 @08:44PM (#36026128)
You're exactly right about other frameworks appealing to the lowest common denominator, whereas Typical isn't willing to make such compromises.

Languages without proper sum types are at a disadvantage here, but it's possible to encode sum types with exhaustive pattern matching in such languages using the visitor pattern. That approach requires some ergonomic sacrifices (e.g., having to use a reified eliminator rather than the built-in `switch` statement), and people using those languages may prefer convenience over strong guarantees. It's an unfortunate impedance mismatch.

There are no comments on this comment yet.