home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / lisp / mcl / 1056 < prev    next >
Encoding:
Internet Message Format  |  1992-07-22  |  1.8 KB

  1. Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!ames!sun-barr!apple!cambridge.apple.com!kieras%kirk.engin.umich.edu@srvr1.engin.umich.edu
  2. From: kieras@engin.umich.edu (David Kieras)
  3. Newsgroups: comp.lang.lisp.mcl
  4. Subject: PROGV mystery explained
  5. Message-ID: <5a1aeebcb.000fb61@kirk.engin.umich.edu>
  6. Date: 22 Jul 92 15:43:19 GMT
  7. Sender: info-mcl-request@cambridge.apple.com
  8. Lines: 27
  9. Approved: comp.lang.lisp.mcl@Cambridge.Apple.C0M
  10. Original-To: kab@cambridge.apple.com
  11. Original-Cc: info-mcl@cambridge.apple.com
  12.  
  13. Thanks, everybody, for your suggestions, and pointing out that
  14. PROGV doesn't in fact declare anything, and since MCL EVAL runs
  15. everything through COMPILE, of course I get an undeclared free
  16. variable message.  My previous implementations (in UCI Lisp,
  17. Franz, Interlisp-D, Franz Allegro CL) never griped about this
  18. point in this and similar code, since apparently they just
  19. interpreted the form to an EVAL, and the variables in question
  20. were bound at the time.  I guess its like your income tax; just
  21. because you didn't get caught doesn't mean you did it right.
  22.  
  23. Kim's suggestion to do
  24.  
  25.     (PROGV SYMBOL-LIST VALUE-LIST
  26.       ...
  27.       (DOLIST (ACTION ACTION-LIST)
  28.         ...   (EVAL `(locally (declare (special ,@symbol-list)) ,ACTION))
  29.  
  30. works and provides exactly what I had in mind, since declaring
  31. the variables globally special is not my intent. Moreover, it
  32. works fine in my old Franz Allegro CL, which it should.
  33.  
  34. Kim, your mention that EVAL does COMPILE by default prompts me to
  35. ask about the performance implications.  How much, relatively &
  36. intuitively, am I paying for this?   Would I be better off to
  37. arrange it so that compile is not the default on EVAL?  If so,
  38. what is the switch for it? Is this the same control as for the
  39. toplevel READ-EVAL loop?
  40.