home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.scheme:2852 comp.lang.c:19132
- Path: sparky!uunet!spool.mu.edu!yale.edu!yale!mintaka.lcs.mit.edu!ai-lab!zurich.ai.mit.edu!gjr
- From: gjr@zurich.ai.mit.edu (Guillermo J. Rozas)
- Newsgroups: comp.lang.scheme,comp.lang.c
- Subject: Re: applying or
- Date: 2 Jan 93 08:09:47
- Organization: M.I.T. Artificial Intelligence Lab.
- Lines: 15
- Message-ID: <GJR.93Jan2080947@chamarti.ai.mit.edu>
- References: <1993Jan1.184655.7023@viewlogic.com>
- Reply-To: gjr@zurich.ai.mit.edu
- NNTP-Posting-Host: chamartin.ai.mit.edu
- In-reply-to: josh@viewlogic.com's message of Fri, 1 Jan 1993 18:46:55 GMT
-
-
- In article <1993Jan1.184655.7023@viewlogic.com> josh@viewlogic.com (Josh Marantz) writes:
-
- | 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?
-
- The issue here is whether the order of execution of expressions can be
- changed by the compiler with respect to the one specified by the
- semantics. In general compilers are allowed to do this if they can
- prove that the effect is the same, in other words, that the user can't
- tell what order things were done in.
-