home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.scheme:2856 comp.lang.c:19199
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!olivea!apple!voder!woodstock!news
- From: dyer@airplane.sharebase.com (Scot Dyer)
- Newsgroups: comp.lang.scheme,comp.lang.c
- Subject: Re: applying or
- Message-ID: <1993Jan4.190721.10508@sharebase.com>
- Date: 4 Jan 93 19:07:21 GMT
- References: <1993Jan1.184655.7023@viewlogic.com>
- Reply-To: dyer@airplane.sharebase.com (Scot Dyer)
- Organization: NCR/ShareBase Corporation
- Lines: 16
-
- From: josh@viewlogic.com (Josh Marantz)
- /// I was sort of glad to move to C/Scheme, where this short-circuiting
- /// was guaranteed, although I never thought about the compiler
- /// optimizations that the short-circuit guarantee prevents! Would it be
- /// legal for a C or Scheme compiler to avoid the short-circuiting if it
- /// could prove there were no side effects involved, and if it looked like
- /// a fruitful optimization?
-
- Who would know it had been done? ;)
-
- -- Scot
-
- P.S. This is a GOOD IDEA. I think Scheme compilers will eventually keep
- track of the functional purity of functions and optimize accordingly.
- Until then, the current AND is useful in the extreme... Especially to
- teach programmers that things aren't always what they seem! ;)
-