Partially Matching Zig Enums

35 points by runxiyu


bwbuhse

I do enjoy comptime unreachable

hafiz

In principle in the first case the type system could prove that wildcard _ case is actually unreachable, with flow typing/type narrowing (ala Kotlin, TypeScript). There is some complication with this in general though. In a sense this is what the Zig version is doing!

runxiyu
Comment removed by author