3 ms·
I like doing that too, but the Zig syntax doesn't prevent that kind of arrangement, just makes it a bit wider. return if (value >= radix) error.InvalidChar
by drjeats 10y ago
I like doing that too, but the Zig syntax doesn't prevent that kind of arrangement, just makes it a bit wider.
return if (value >= radix) error.InvalidChar else
if (comeCondition) error.OtherError else
...
value;
or maybe this, but it seems uglier to me:
return if (value >= radix) error.InvalidChar
else if (comeCondition) error.OtherError
...
else value;