home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / scheme / 2855 next >
Encoding:
Internet Message Format  |  1993-01-04  |  2.5 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!olivea!apple!voder!woodstock!news
  2. From: dyer@airplane.sharebase.com (Scot Dyer)
  3. Newsgroups: comp.lang.scheme
  4. Subject: Re: applying or
  5. Message-ID: <1993Jan4.190258.10397@sharebase.com>
  6. Date: 4 Jan 93 19:02:58 GMT
  7. References: <MOB.92Dec30090646@strident.think.com> <1hsiocINN2v6@columbia.cs.ubc.ca> <1992Dec31.181545.19917@sharebase.com> <1i06a0INNgtl@columbia.cs.ubc.ca>
  8. Reply-To: dyer@airplane.sharebase.com (Scot Dyer)
  9. Organization: NCR/ShareBase Corporation
  10. Lines: 47
  11.  
  12. From: manis@cs.ubc.ca (Vincent Manis)
  13. ///
  14. /// In article <1992Dec31.181545.19917@sharebase.com>
  15. /// dyer@airplane.sharebase.com (Scot Dyer) writes:
  16. /// >Even in Algol, implicit delayed evaluation of procedure parameters was
  17. /// >allowed -- a scary coincidence, yes? :)
  18. /// [...]
  19. /// Er, yes, and if you want to know the truth about `call-by-name', read
  20. /// Don Knuth's article `Algol 60 Confidential', which appeared in CACM
  21. /// sometime around '68. Name parameters and own[*] variables were ideas which
  22. /// were very elegant indeed; the only problem with them was that they
  23. /// couldn't be implemented efficiently (or at all, as in the case with own
  24. /// array variables with dynamic bounds). I'm a great fan of elegance, but I
  25. /// like my programs to run at speeds somewhat faster than glacial, too.
  26.  
  27. Most original ideas contain flaws like this that people don't see until they
  28. write perverse procedures like your "foo"  LISPs mis-use of NIL might be
  29. irritating, but compare it to the FORTRANs that were availible at the time
  30. and the flaw seems quite minor.
  31.  
  32. I don't believe either own variables or named parameters interact with delay-ed
  33. evaluation of procedure parameters (like in "if" or... see subject: line),
  34. though.  It is a nice perversity for Algol fans, though.  :)
  35.  
  36. /// [*] Own variables were Algol 60's counterpart of statics. The problem
  37. /// was that own variables were first class, which led to things like
  38. /// 
  39. ///   procedure foo(i);
  40. ///      integer i;
  41. ///   begin
  42. ///      own integer a[i];
  43. ///      integer j;
  44. ///      if i < 10 then
  45. ///         for j := 1 to i do
  46. ///            read(a[j]);
  47. ///      else
  48. ///         a[11] := a[12];
  49. ///   end;
  50. /// 
  51. ///   foo(9);  foo(12); foo(9); foo(12);
  52. /// 
  53. /// It really helps when designing a programming language to be able to
  54. /// attribute a meaning to all legal programs!
  55.  
  56. Or to know exactly which programs should be considered illegal.  I don't think
  57. context-free description is really that valuable for semmantics... As the
  58. above procedure demonstrates.
  59.