home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / pop / 188 < prev    next >
Encoding:
Text File  |  1993-01-07  |  3.5 KB  |  97 lines

  1. Newsgroups: comp.lang.pop
  2. Path: sparky!uunet!pipex!doc.ic.ac.uk!syma!ianr
  3. From: ianr@syma.sussex.ac.uk (Ian Rogers)
  4. Subject: lvars and standards (was: Re: List and Vector Syntax)
  5. Message-ID: <1993Jan7.154850.16982@syma.sussex.ac.uk>
  6. Organization: University of Sussex at Brighton
  7. References: <116670035@otter.hpl.hp.com> <116670041@otter.hpl.hp.com> <C07Bop.DwH@cs.bham.ac.uk>
  8. Date: Thu, 7 Jan 1993 15:48:50 GMT
  9. Lines: 86
  10.  
  11. axs@cs.bham.ac.uk (Aaron Sloman) writes:
  12. > Of course all the proposed changes will prove so painful to the
  13. > existing Pop-11 users that many of them will want to go on using the
  14. > old version (just as many refuse to switch to using lexical
  15. > variables: they like the non-lexical defaults: witness the new
  16. > book by Chris Thorton and Ben du Boulay "Artificial Intelligence
  17. > Through Search" which uses Pop-11 and Prolog throughout, and so
  18. > far I've not found a single "lvars" in it!).
  19.  
  20. I have met noone who can provide a rational argument for dynamic
  21. locals over lexical locals! The current "vars" mechanism is a
  22. syntactic sugar for creating top-level identifiers and localising
  23. them to a procedure. I saw this device used to my horror when I was
  24. tidying a core flavours library (it's fixed now :).
  25.  
  26. I'm glad that AITS does not contain any lvars statements as that
  27. would make Pop11 seem bulky and unwieldy. It is possible to
  28. construct examples, that use the default declarations, that do not
  29. require the benefits of lvars and avoid the hinderances of vars.
  30.  
  31. lvars as default is a Good Thing, the One True Way, there Can Be No
  32. Argument!!!!! :-) There are many examples and arguments that show
  33. this. I shan't attempt to repeat them all here but here's one goody:
  34.  
  35.     vars i = 'got it wrong buster';
  36.  
  37.     define make_pdr(i);
  38.         procedure;
  39.             i =>
  40.         endprocedure
  41.     enddefine;
  42.  
  43.     vars pd = make_pdr(3);
  44.     pd();
  45.     ** got it wrong buster
  46.  
  47. Huh ??!?!?!?!!?!?
  48.  
  49.     define do_it_right(i);
  50.         lvars i;
  51.         procedure;
  52.             i =>
  53.         endprocedure
  54.     enddefine;
  55.  
  56.     vars yup = do_it_right(10);
  57.     yup();
  58.     ** 10
  59.  
  60. -dlocal-ising a permanent identifier is a special programming
  61. technique, and should be exposed by a deliberate "dlocal" whenever
  62. it occurs.
  63.  
  64. Aaron often talks about beginners, my hunch is that they won't
  65. notice the difference between default "vars" and "lvars" locals
  66. (and don't initially understand either).
  67.  
  68. > So the "pop" community will inevitably be further fragmented once an
  69. > implementation of Pepper becomes available.
  70.  
  71. Probable, if we miss the chance to create a standard Pop11.
  72.  
  73. > A new "standard" won't have the same effect as with C, where
  74. > everyone (or almost everyone) agreed to a new version because people
  75. > trying to produce portable software in C were already suffering from
  76. > the incompatibilities between differen versions produced by
  77. > different vendors. There's no such pressure for a new standard for
  78. > Pop.
  79. >
  80. > Perhaps pressure will be created by producing an implementation
  81. > of Pepper that runs on very popular machines where Poplog Pop-11 is
  82. > not available, i.e. PCs running MSDOS and Macs !!!!
  83.  
  84. There will be no MSDOS or Mac version of Pop11 without an
  85. identifiable, sufficient subset of Pop11 commands and syntax. This
  86. is why Pepper and GLOW have occurred!
  87.  
  88. If we allow market forces to reign then in 10 years time (if we're
  89. lucky) the standard Pop11 will be a mixture of the de-facto
  90. standards of Pepper and GLOW. Pop11 will disappear.
  91.  
  92. A standard Pop11 will provide an impetus for a portable Pop11. By
  93. following Steve's lead we have the chance to strongly influence the
  94. standard.
  95.  
  96. Ian.
  97.