[plt-scheme] Re: boolean operators on integers
On Sat, Jul 12, 2008 at 07:35:17AM -0700, wooks wrote:
>
>
> On Jul 12, 9:02 am, Matthias Felleisen <matth... at ccs.neu.edu> wrote:
> > Can you explain why you think 0 and 1 should have anything to do with
> > true and false? (I am afraid that it somehow slipped into a document
> > that may confuse our users and we need to clarify this. -- In
> > centuries past, around 1738, people thought that 0 stood for #f and
> > that 1 stood for #t. But this pun hasn't been useful to real
> > programmer since then so I don't know where one would fine this idea,
> > except in history books.)
> >
Recursive function theorists in mid-20'th century or before (definitely
before computers) used 0 = true and 1 = false. This had the nice effect
that they could use exponentiation for not:
0 ** 0 = 1
0 ** 1 = 0
-- hendrik