Newsgroups: comp.lang.scheme
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!EU.net!julienas!news.fnet.fr!ilog!news
From: davis@ilog.fr (Harley Davis)
Subject: Re: Why is `not' a procedure?
In-Reply-To: hbaker@netcom.com's message of Wed, 16 Nov 1994 03:02:43 GMT
Message-ID: <DAVIS.94Nov16134955@passy.ilog.fr>
Lines: 26
Sender: news@ilog.fr
Nntp-Posting-Host: passy
Organization: Ilog SA, Gentilly, France
References: <ZIGGY.94Nov15145855@biere.ai.mit.edu> <3abgig$111@larry.rice.edu>
	<ZIGGY.94Nov15212129@biere.ai.mit.edu> <hbakerCzCB4J.LEL@netcom.com>
Date: 16 Nov 1994 12:49:55 GMT


In article <hbakerCzCB4J.LEL@netcom.com> hbaker@netcom.com (Henry G. Baker) writes:

   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.

I'm not sure how to specify the legality of such a move, since the
creation of the structure might have important side-effects that the
caller counts on.

-- Harley Davis
-- 

------------------------------------------------------------------------------
Harley Davis                            net: davis@ilog.fr
ILOG S.A.                               tel: +33 1 46 63 66 66
2 Avenue Gallini, BP 85                fax: +33 1 46 63 15 82
94253 Gentilly Cedex, France            url: http://www.ilog.fr/

           Ilog Talk information: info@ilog.com
