[plt-scheme] Re: boolean operators on integers

From: wooks (wookiz at hotmail.com)
Date: Sat Jul 12 10:35:17 EDT 2008

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.)

Jens articulated it better than I did, I was really seeking to do
bitwise operations.

> ;; ---
> 1. In Scheme, ALL values except #f denote "truth".
> 2. In Scheme, and is a form that evaluates ALL sub-expressions until
> one of them produces #f. If none do, it produces the value of the
> last sub-expression.
> The two points explain what you see in the Pretty Big Language.

All the replies have been very elucidating - I'm grateful.

Posted on the users mailing list.