News for hackers. Stuff that matters.
Re:Why I rewrote my Rust keyboard firmware in Zig: consisten... by dnautics on Sunday March 07, 2021 @03:04PM (#26379255)
You make a good point that the standard library could make better use of this pattern to show it off, but the language was designed with this sort of thing as an affordance and there even is a (rough) example in the docs: https://ziglang.org/documentation/master/#Tagged-union

You wouldn't have to rewrite the world, but the language is young and maybe more effort could go into making using this pattern more idiomatic and encourage library writers to do it more often.

There are no comments on this comment yet.