<story><title>Packed structs in Zig make bit/flag sets trivial</title><url>https://devlog.hexops.com/2022/packed-structs-in-zig/</url></story><parent_chain></parent_chain><comment><author>arjvik</author><text>if (mask &amp;amp; (WGPUColorWriteMask_Alpha|WGPUColorWriteMask_Blue)) {
    &amp;#x2F;&amp;#x2F; alpha and blue are set..
}&lt;p&gt;Doesn&amp;#x27;t this give you if alpha OR blue is set?&lt;p&gt;Errors like this are another reason syntactical sugar for readability is important.</text></comment>
<story><title>Packed structs in Zig make bit/flag sets trivial</title><url>https://devlog.hexops.com/2022/packed-structs-in-zig/</url></story><parent_chain></parent_chain><comment><author>MobiusHorizons</author><text>This is a nice syntax, but the functionality seems essentially the same as bit fields in C. Does this provide anything additional?</text></comment>