home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / scheme / 2839 < prev    next >
Encoding:
Internet Message Format  |  1992-12-30  |  2.5 KB

  1. Path: sparky!uunet!think.com!news!mob
  2. From: mob@strident.think.com (Mario O. Bourgoin)
  3. Newsgroups: comp.lang.scheme
  4. Subject: Re: applying or
  5. Date: 30 Dec 92 09:06:46
  6. Organization: Thinking Machines Corporation, Cambridge MA, USA
  7. Lines: 46
  8. Message-ID: <MOB.92Dec30090646@strident.think.com>
  9. References: <BztJDI.1J1@malihh.hanse.de> <BztyDu.KDE@cs.psu.edu>
  10.     <1hg6ofINN7ev@agate.berkeley.edu>
  11.     <PK.92Dec28100620@talitiainen.cs.tut.fi>
  12.     <HULTQUIS.92Dec28102345@wk206.nas.nasa.gov>
  13. NNTP-Posting-Host: strident.think.com
  14. In-reply-to: hultquis@wk206.nas.nasa.gov's message of 28 Dec 92 10:23:45
  15.  
  16.  
  17. I am at a loss for naming an existing programming language that has AND and
  18. OR and where they do not have the same behavior as they do in Scheme.
  19. Would some programming language cogniscenti be kind enough to name a few?
  20.  
  21. --Mario
  22.  
  23. In article <HULTQUIS.92Dec28102345@wk206.nas.nasa.gov> hultquis@wk206.nas.nasa.gov (Jeff P. M. Hultquist) writes:
  24.  
  25.    Newsgroups: comp.lang.scheme
  26.    Path: think.com!yale.edu!qt.cs.utexas.edu!cs.utexas.edu!sun-barr!ames!data.nas.nasa.gov!data!hultquis
  27.    From: hultquis@wk206.nas.nasa.gov (Jeff P. M. Hultquist)
  28.    References: <BztJDI.1J1@malihh.hanse.de> <BztyDu.KDE@cs.psu.edu>
  29.        <1hg6ofINN7ev@agate.berkeley.edu>
  30.        <PK.92Dec28100620@talitiainen.cs.tut.fi>
  31.    Sender: news@nas.nasa.gov (News Administrator)
  32.    Organization: NASA Ames Research Center, CA USA
  33.    Date: 28 Dec 92 10:23:45
  34.    Reply-To: hultquis@nas.nasa.gov
  35.    Lines: 25
  36.  
  37.    In article <PK.92Dec28100620@talitiainen.cs.tut.fi> pk@cs.tut.fi (Kellom{ki Pertti) writes:
  38.  
  39.  
  40.    >    >  Of course, you *could* do this sort of computation even if
  41.    >    >  AND and OR were ordinary procedures, by avoiding AND and OR
  42.    >    >  and using IF instead in such cases.  But this way is deemed
  43.    >    >  more aesthetically pleasing.
  44.    > 
  45.    >    I've never liked the way AND and OR are defined. I don't claim that
  46.    >    they are not convinient, I'm just not very fond of control structures
  47.    >    posing themselves as logic operators to the unwary. 
  48.  
  49.    I agree.  These short-circuiting special-forms *are* quite
  50.    useful, but the names which have been chosen for these *is*
  51.    often confusing "to the unwary".
  52.  
  53.    When explaining this problem to others, I like to point
  54.    out that, unlike many of the predicate functions, AND and
  55.    OR do not have a trailing question mark.  Functions which
  56.    do what the original poster wanted might well be called
  57.    EVERY? and ANY?.  
  58.  
  59.    --
  60.    Jeff Hultquist                          hultquis@nas.nasa.gov
  61.    NASA - Ames Research Center             (415) 604-4970
  62.