[Haskell-cafe] Unnecessarily strict implementations
ajs at 2piix.com
Thu Sep 2 19:58:38 EDT 2010
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe