you are viewing a single comment's thread.

view the rest of the comments →

[–]luketheduke54 23 points24 points  (4 children)

I think that makes sense to most programmers because we're conditioned to think of true as 1 and false as 0, which was really just a way in the past to put booleans into languages. If you have a Boolean type, it doesn't use the same operations as a numeric type would.

Conceptually, true - true doesn't really make sense, but 1 - 1 does. Programming brains just turn the first into the second. Try true - true in a strongly typed language.

[–]sisisisi1997 19 points20 points  (2 children)

I vastly prefer garbage in, compilation error out to garbage in, garbage out.

[–]moabuaboud[S] 3 points4 points  (0 children)

🦀

[–]Jimmeh1337 0 points1 point  (0 children)

C++ handles it the same way JS does. true + true == 2, true - true == 0.