home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / scheme / 2838 < prev    next >
Encoding:
Text File  |  1992-12-28  |  1.7 KB  |  41 lines

  1. Newsgroups: comp.lang.scheme
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!sun-barr!ames!data.nas.nasa.gov!data!hultquis
  3. From: hultquis@wk206.nas.nasa.gov (Jeff P. M. Hultquist)
  4. Subject: Re: applying or
  5. In-Reply-To: pk@cs.tut.fi's message of 28 Dec 92 10:06:20
  6. References: <BztJDI.1J1@malihh.hanse.de> <BztyDu.KDE@cs.psu.edu>
  7.     <1hg6ofINN7ev@agate.berkeley.edu>
  8.     <PK.92Dec28100620@talitiainen.cs.tut.fi>
  9. Sender: news@nas.nasa.gov (News Administrator)
  10. Organization: NASA Ames Research Center, CA USA
  11. Date: 28 Dec 92 10:23:45
  12. Message-ID: <HULTQUIS.92Dec28102345@wk206.nas.nasa.gov>
  13. Reply-To: hultquis@nas.nasa.gov
  14. Lines: 25
  15.  
  16. In article <PK.92Dec28100620@talitiainen.cs.tut.fi> pk@cs.tut.fi (Kellom{ki Pertti) writes:
  17.  
  18.  
  19. >    >  Of course, you *could* do this sort of computation even if
  20. >    >  AND and OR were ordinary procedures, by avoiding AND and OR
  21. >    >  and using IF instead in such cases.  But this way is deemed
  22. >    >  more aesthetically pleasing.
  23. >    I've never liked the way AND and OR are defined. I don't claim that
  24. >    they are not convinient, I'm just not very fond of control structures
  25. >    posing themselves as logic operators to the unwary. 
  26.  
  27. I agree.  These short-circuiting special-forms *are* quite
  28. useful, but the names which have been chosen for these *is*
  29. often confusing "to the unwary".
  30.  
  31. When explaining this problem to others, I like to point
  32. out that, unlike many of the predicate functions, AND and
  33. OR do not have a trailing question mark.  Functions which
  34. do what the original poster wanted might well be called
  35. EVERY? and ANY?.  
  36.  
  37. --
  38. Jeff Hultquist                          hultquis@nas.nasa.gov
  39. NASA - Ames Research Center             (415) 604-4970
  40.