Re:Evil Coding Incantations
by abecedarius on Monday December 25, 2017 @05:38PM
(#16006008)
0 for false goes all the way back to Boole. He used multiplying for AND and adding for OR. You can also think of a Boolean as an index into a list of choices: “if t then c else a” could be written “[a, c][t]”. This is sometimes a good way to think about booleans, not just a hack: for instance it leads you to multiway decision diagrams to generalize BDDs.
Still I prefer a distinct Boolean type, too.