Julia’s Bool
is a subtype of Integer
, so they do behave like them in some contexts. It’s not a perfect situation, but it works — and I’d argue it’s more helpful in practice than it is hurtful.
There are a number of places where we favor practicality over theoretical purity.