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

  1. Newsgroups: comp.lang.scheme
  2. Path: sparky!uunet!spool.mu.edu!uwm.edu!linac!att!att!dptg!ulysses!allegra!princeton!csservices!kastle!blume
  3. From: blume@kastle.Princeton.EDU (Matthias Blume)
  4. Subject: Re: Unspecified values in R4RS
  5. Message-ID: <1993Jan23.173800.11999@csservices.Princeton.EDU>
  6. Sender: news@csservices.Princeton.EDU (USENET News System)
  7. Reply-To: blume@kastle.Princeton.EDU (Matthias Blume)
  8. Organization: Dept. of Computer Science, Princeton University
  9. References: <OZ.93Jan22114638@ursa.sis.yorku.ca> <1jpf3e$2m1@agate.berkeley.edu> <OZ.93Jan22174029@ursa.sis.yorku.ca> <1jqqjc$b4p@agate.berkeley.edu>
  10. Date: Sat, 23 Jan 1993 17:38:00 GMT
  11. Lines: 41
  12.  
  13. In article <1jqqjc$b4p@agate.berkeley.edu>, bh@anarres.CS.Berkeley.EDU
  14. (Brian Harvey) writes:
  15. |> oz@ursa.sis.yorku.ca (Ozan Yigit) writes:
  16. |> >But if you want trivial interactions such as these to work as you would
  17. |> >like them to, you may just as well do something like what David Kelsden
  18. |> >sent me the other day:
  19. |> >
  20. |> >   (define void (string->symbol ""))
  21. |> >
  22. |> >   (define (praise thing)
  23. |> >     (display thing)
  24. |> >     (display " is great!")
  25. |> >     void)
  26. |> >
  27. |> >Is this not easier than changing the whole language definition? ;-)
  28. |> 
  29. |> *You* can write programs like that, and *I* can write programs like
  30. |> that, but *my students* are going to fall into any pitfalls that the
  31. |> language leaves in their path.
  32.  
  33. Oh!  I had a better opinion about Berkeley students...  If you tell them that
  34. the Scheme system responds by printing the result of an expression *every*
  35. time and if you show them your little ``praise'' example to see the
  36. problem they should get it immediately.  Your ``pitfall'' is really not
  37. such a big deal to justify changes to the language!
  38.  
  39. |> 
  40. |> I'm not suggesting that an entirely pitfall-free language is possible
  41. |> or desirable, but this particular pitfall (stupid return values from
  42. |> commands called for effect) seems to be easily avoidable and to have
  43. |> no redeeming features.
  44.  
  45. The ``redeeming'' feature has a name: orthogonality.  One of the major
  46. advantages (in terms of simplicity) of Scheme was that everything has a
  47. value.  To invent ``unspecified values'' is just the same as re-inventing
  48. the distinction between commands and expressions.  Once we have this doesn't it
  49. appear to be a nasty pitfall if we are still allowed to write ``commands'' in
  50. ``expression'' contexts.  No, we are not moving toward ML -- we will
  51. probably end up with Pascal!
  52.  
  53. -Matthias
  54.