Some of my thoughts on using enums in place of bool
, adding a way to opt-in to an implicit conversion could have some benefits.
Zig enums provide a convenient way to represent dual-state values (booleans) with domain-specific names. An example of this is std.builtin.Signedness
:
const Signedness = enum { unsigned, signed };