I've just filed a proposal to make bool an ordered type (compatible with operators <, <=, >, and >=) in #golang: https://github.com/golang/go/issues/78027
proposal: spec: make bool an ordered type · Issue #78027 · golang/go

Go Programming Experience Experienced Other Languages Experience Python, Haskell, JavaScript, C Related Idea Has this idea, or one like it, been proposed before? Does this affect error handling? Is...

GitHub
Unfortunately, this proposal would require a breaking change. Therefore, I've decided to retract it.