Why Bool is a Number?

just came across true + 3 == 4, and also true isa Number

What is the reason why a boolean gets converted to Int automatically?

I found some related discussion here

2 Likes

It basically boils down to the fact that it is quite practical, as discussed in the first part of https://arxiv.org/pdf/math/9205211.pdf on Iverson’s bracket and strong zeros.

3 Likes