logoalt Hacker News

oddCopper65 • today at 7:47 PM • 1 reply • view on HN

The enum-over-bool rule is the one I'd keep even solo, saved me a reversed flag in a cert validator once.


Replies

sebastianconcpt • today at 8:00 PM

This is a sub-case of the general one that is narrowing the interpretation of things. A big infinite amount of things can be true or false, only one can be a Rust variant.