home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / scheme / 2962 < prev    next >
Encoding:
Internet Message Format  |  1993-01-24  |  1.7 KB

  1. Path: sparky!uunet!gumby!destroyer!cs.ubc.ca!columbia.cs.ubc.ca!not-for-mail
  2. From: manis@cs.ubc.ca (Vincent Manis)
  3. Newsgroups: comp.lang.scheme
  4. Subject: Re: Unspecified values in R4RS
  5. Date: 24 Jan 1993 09:51:52 -0800
  6. Organization: The Invisible City of Kitezh
  7. Lines: 22
  8. Message-ID: <1jukvoINNgis@columbia.cs.ubc.ca>
  9. References: <1993Jan21.195822.23639@sqwest.wimsey.bc.ca> <1jn7ou$m5n@agate.berkeley.edu>
  10. NNTP-Posting-Host: columbia.cs.ubc.ca
  11.  
  12. In article <1jn7ou$m5n@agate.berkeley.edu> bh@anarres.CS.Berkeley.EDU
  13. (Brian Harvey) writes:
  14. >About unspecified values, in my *strong* opinion these should all be
  15. >expunged from the standard and replaced with a nonprinting value...
  16. Yes!!! This has a number of pedagogical advantages, not least of which
  17. is that it makes clear the difference between an expression (evaluated
  18. primarily for value) and a command (evaluated only for effect). For
  19. proficient programmers, this isn't a big deal, but for beginners it's
  20. essential. 
  21.  
  22. I like the Chez Scheme approach. There's a void type, with only a single
  23. value. The procedure (void) yields this value, and (void? x) is a
  24. type-checking predicate. This is a simple, clean, approach, and is quite
  25. compatible with existing Schemes. (If your Scheme doesn't have an
  26. #unspecified, you can always use a gensym.) Apart from this, the only
  27. other change which has to be made is to have the top level print nothing
  28. when the result is void.
  29. -- 
  30. \    Vincent Manis <manis@cs.ubc.ca>      "There is no law that vulgarity and
  31.  \   Computer Science, Langara College     literary excellence cannot coexist."
  32.  /\  100 W. 49th Ave, Vancouver, BC, Canada (604) 324-5205  -- A. Trevor Hodge
  33. /  \ Co-author of ``The Schematics of Computation'', Prentice-Hall, Jan 1994
  34.