Get the latest tech news

Partially Matching Zig Enums


A short post about a neat little Zig idiom. Consider your average {sum type, variant, tagged union, enum, alt}:

Consider your average {sum type, variant, tagged union, enum, alt}: The universal recipe for solving the AB problem relies on a runtime panic: I wrote code of this shape many times, and it never failed at runtime due to a misapplied refactor later.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Matching Zig Enums

Matching Zig Enums