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

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!caen!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: applying or
  5. Date: 31 Dec 1992 17:21:04 -0800
  6. Organization: Institute for Pure and Applied Eschatology
  7. Lines: 37
  8. Message-ID: <1i06a0INNgtl@columbia.cs.ubc.ca>
  9. References: <MOB.92Dec30090646@strident.think.com> <1hsiocINN2v6@columbia.cs.ubc.ca> <1992Dec31.181545.19917@sharebase.com>
  10. NNTP-Posting-Host: columbia.cs.ubc.ca
  11.  
  12. In article <1992Dec31.181545.19917@sharebase.com>
  13. dyer@airplane.sharebase.com (Scot Dyer) writes: 
  14. >Even in Algol, implicit delayed evaluation of procedure parameters was
  15. >allowed -- a scary coincidence, yes? :)
  16. Er, yes, and if you want to know the truth about `call-by-name', read
  17. Don Knuth's article `Algol 60 Confidential', which appeared in CACM
  18. sometime around '68. Name parameters and own[*] variables were ideas which
  19. were very elegant indeed; the only problem with them was that they
  20. couldn't be implemented efficiently (or at all, as in the case with own
  21. array variables with dynamic bounds). I'm a great fan of elegance, but I
  22. like my programs to run at speeds somewhat faster than glacial, too.
  23.  
  24. [*] Own variables were Algol 60's counterpart of statics. The problem
  25. was that own variables were first class, which led to things like
  26.  
  27.   procedure foo(i); 
  28.      integer i;
  29.   begin
  30.      own integer a[i];
  31.      integer j;
  32.      if i < 10 then
  33.         for j := 1 to i do
  34.            read(a[j]);
  35.      else
  36.         a[11] := a[12]; 
  37.   end; 
  38.  
  39.   foo(9);  foo(12); foo(9); foo(12); 
  40.  
  41. It really helps when designing a programming language to be able to
  42. attribute a meaning to all legal programs!
  43.  
  44. -- 
  45. \    Vincent Manis <manis@cs.ubc.ca>      "There is no law that vulgarity and
  46.  \   Computer Science, Langara College     literary excellence cannot coexist."
  47.  /\  100 W. 49th Ave, Vancouver, BC, Canada (604) 324-5205  -- A. Trevor Hodge
  48. /  \ Co-author of ``The Schematics of Computation'', Prentice-Hall, Jan 1994
  49.