home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / scheme / 2852 < prev    next >
Encoding:
Internet Message Format  |  1993-01-02  |  1.4 KB

  1. Xref: sparky comp.lang.scheme:2852 comp.lang.c:19132
  2. Path: sparky!uunet!spool.mu.edu!yale.edu!yale!mintaka.lcs.mit.edu!ai-lab!zurich.ai.mit.edu!gjr
  3. From: gjr@zurich.ai.mit.edu (Guillermo J. Rozas)
  4. Newsgroups: comp.lang.scheme,comp.lang.c
  5. Subject: Re: applying or
  6. Date: 2 Jan 93 08:09:47
  7. Organization: M.I.T. Artificial Intelligence Lab.
  8. Lines: 15
  9. Message-ID: <GJR.93Jan2080947@chamarti.ai.mit.edu>
  10. References: <1993Jan1.184655.7023@viewlogic.com>
  11. Reply-To: gjr@zurich.ai.mit.edu
  12. NNTP-Posting-Host: chamartin.ai.mit.edu
  13. In-reply-to: josh@viewlogic.com's message of Fri, 1 Jan 1993 18:46:55 GMT
  14.  
  15.  
  16. In article <1993Jan1.184655.7023@viewlogic.com> josh@viewlogic.com (Josh Marantz) writes:
  17.  
  18. |   I was sort of glad to move to C/Scheme, where this short-circuiting
  19. |   was guaranteed, although I never thought about the compiler
  20. |   optimizations that the short-circuit guarantee prevents!  Would it be
  21. |   legal for a C or Scheme compiler to avoid the short-circuiting if it
  22. |   could prove there were no side effects involved, and if it looked like
  23. |   a fruitful optimization?
  24.  
  25. The issue here is whether the order of execution of expressions can be
  26. changed by the compiler with respect to the one specified by the
  27. semantics.  In general compilers are allowed to do this if they can
  28. prove that the effect is the same, in other words, that the user can't
  29. tell what order things were done in.
  30.