Newsgroups: comp.lang.scheme
Path: cantaloupe.srv.cs.cmu.edu!fs7.ece.cmu.edu!hudson.lm.com!godot.cc.duq.edu!newsfeed.pitt.edu!gatech!newsxfer.itd.umich.edu!nntp.cs.ubc.ca!torn!uunet.ca!uunet.ca!sq!dak
From: dak@sq.sq.com (David A. Keldsen)
Subject: Re: Why is `not' a procedure?
Message-ID: <1994Nov21.174711.2163@sq.sq.com>
Organization: SoftQuad Inc., Toronto, Canada
References: <HUGH.94Nov14133734@hugh.cosc.canterbury.ac.nz> 	<ZIGGY.94Nov14185518@biere.ai.mit.edu> <HUGH.94Nov16151058@hugh.cosc.canterbury.ac.nz>
Date: Mon, 21 Nov 94 17:47:11 GMT
Lines: 35

hugh@hugh.cosc.canterbury.ac.nz (Hugh Emberson) writes:

>What I want to know is:

>    Why, given the choice of making `NOT' a procedure or a special
>    form, it was decided to make `NOT' a procedure when `AND', `OR'
>    and `IF' are (necessarily) special forms.

>I find it strange, since I tend to lump `IF', `AND', `OR' and `NOT'
>together into one class of things, yet one of them different.

OK, think of it this way:  what would it *mean* for NOT to be a special form?
It's essentially a degenerate optimization of (if foo #f #t), and needs
no special evaluation semantics, because the then and else are constants
(so we don't care if they get evaluated, just that they have a value).

...

Now, look at it from another perspective: suppose we are designing a
language, which has as a design goal *very little syntax*.  We want to
minimize the number of syntactic constructs.  We have decided to have
syntax for some control flow contructs (IF, AND, OR) in order to reduce
the syntactic overhead of common programming idioms, and to improve the
expressiveness of the language.  NOT is in the same class, but since
it doesn't require special evaluation semantics, it doesn't have to be
syntax.  Therefore, make it a procedure.

Dak
[who had nothing to do with the r4rs, other than significant admiration;
 these are not the opinions of SoftQuad Inc.]
--
David A. 'Dak' Keldsen
Product Development Manager
SoftQuad Inc.
Toronto, Canada
