Why is Bool an Integer?

I just realized that Bool is a subtype of Integer… why? When I have a function that takes an Integer value I don’t expect to get dispatched with true or false value…

That’s very C-like but makes no logical sense to me otherwise…

See the discussion in make Bool <: Unsigned (i.e. UInt1) · Issue #19168 · JuliaLang/julia · GitHub

3 Likes