home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / scheme / 2951 < prev    next >
Encoding:
Text File  |  1993-01-23  |  1.4 KB  |  47 lines

  1. Newsgroups: comp.lang.scheme
  2. Path: sparky!uunet!cs.utexas.edu!torn!newshub.ccs.yorku.ca!newshub.ccs.yorku.ca!oz
  3. From: oz@ursa.sis.yorku.ca (Ozan Yigit)
  4. Subject: Re: Unspecified values in R4RS
  5. In-Reply-To: bh@anarres.CS.Berkeley.EDU's message of 22 Jan 1993 18: 40:46 GMT
  6. Message-ID: <OZ.93Jan22174029@ursa.sis.yorku.ca>
  7. Sender: news@newshub.ccs.yorku.ca (USENET News System)
  8. Organization: York U. Student Information Systems Project
  9. References: <BRENT.93Jan22085102@rcx1.ssd.csd.harris.com> <1jp5n7$nm@agate.berkeley.edu>
  10.     <OZ.93Jan22114638@ursa.sis.yorku.ca> <1jpf3e$2m1@agate.berkeley.edu>
  11. Date: Fri, 22 Jan 1993 22:40:29 GMT
  12. Lines: 33
  13.  
  14. Brian Harvey writes:
  15.  
  16. |     ..I was arguing that, e.g., DISPLAY should be required to return
  17. | a nonprinting value, instead of "unspecified" as the standard now says.
  18. | Right now if you write a program like
  19.  
  20. | (define (praise thing)
  21. |   (display thing)
  22. |   (display " is great!") )
  23.  
  24. | you get interactions like
  25.  
  26. | > (praise "Ice cream")
  27. | Ice cream is great!#f
  28.  
  29. | which is not what you wanted.
  30.  
  31. But if you want trivial interactions such as these to work as you would
  32. like them to, you may just as well do something like what David Kelsden
  33. sent me the other day:
  34.  
  35.    (define void (string->symbol ""))
  36.  
  37.    (define (praise thing)
  38.      (display thing)
  39.      (display " is great!")
  40.      void)
  41.  
  42. Is this not easier than changing the whole language definition? ;-)
  43.  
  44. ... oz
  45.  
  46.  
  47.