Newsgroups: comp.lang.scheme
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!ix.netcom.com!netcom.com!hbaker
From: hbaker@netcom.com (Henry G. Baker)
Subject: Re: Why is `not' a procedure?
Message-ID: <hbakerCzCB4J.LEL@netcom.com>
Organization: nil
References: <ZIGGY.94Nov15145855@biere.ai.mit.edu> <3abgig$111@larry.rice.edu> <ZIGGY.94Nov15212129@biere.ai.mit.edu>
Date: Wed, 16 Nov 1994 03:02:43 GMT
Lines: 13

This issue has probably been touched on already, but sophisticated
Lisp compilers compile (NOT x) differently in the context of a boolean
expression where only the non-NILness of the result is important, not
the actual value.  Such an optimization could also be extended to a
run-time system which informed the expression <x> that only its
boolean value was required.  Thus, if x = (foo bar), and foo normally
returns a huge data structure, then foo can save itself a lot of work
by returning (in this context) only NIL or T.

      Henry Baker
      Read ftp.netcom.com:/pub/hbaker/README for info on ftp-able papers.
      Contact hoodr@netcom.com if you have trouble ftping

