
2 Sep
2010
2 Sep
'10
7:58 p.m.
On Sep 2, 2010, at 9:10 AM, Stephen Sinclair wrote:
Sorry to go a bit off topic, but I find it funny that I never really noticed you could perform less-than or greater-than comparisons on Bool values. What's the semantic reasoning behind allowing relative comparisons on booleans? In what context would you use it?
The Boolean values form a Boolean lattice. That's reason enough.
It seems to me a throwback to C's somewhat arbitrary assumption that False=0 and True=1.
That's not arbitrary at all. 0 and 1 are very special numbers, because of the roles they play in addition and multiplication. They "absorb" and "identify" things. http://en.wikipedia.org/wiki/Boolean_algebra_(structure)