home *** CD-ROM | disk | FTP | other *** search
- 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
- From: kieras@engin.umich.edu (David Kieras)
- Newsgroups: comp.lang.lisp.mcl
- Subject: PROGV mystery explained
- Message-ID: <5a1aeebcb.000fb61@kirk.engin.umich.edu>
- Date: 22 Jul 92 15:43:19 GMT
- Sender: info-mcl-request@cambridge.apple.com
- Lines: 27
- Approved: comp.lang.lisp.mcl@Cambridge.Apple.C0M
- Original-To: kab@cambridge.apple.com
- Original-Cc: info-mcl@cambridge.apple.com
-
- Thanks, everybody, for your suggestions, and pointing out that
- PROGV doesn't in fact declare anything, and since MCL EVAL runs
- everything through COMPILE, of course I get an undeclared free
- variable message. My previous implementations (in UCI Lisp,
- Franz, Interlisp-D, Franz Allegro CL) never griped about this
- point in this and similar code, since apparently they just
- interpreted the form to an EVAL, and the variables in question
- were bound at the time. I guess its like your income tax; just
- because you didn't get caught doesn't mean you did it right.
-
- Kim's suggestion to do
-
- (PROGV SYMBOL-LIST VALUE-LIST
- ...
- (DOLIST (ACTION ACTION-LIST)
- ... (EVAL `(locally (declare (special ,@symbol-list)) ,ACTION))
-
- works and provides exactly what I had in mind, since declaring
- the variables globally special is not my intent. Moreover, it
- works fine in my old Franz Allegro CL, which it should.
-
- Kim, your mention that EVAL does COMPILE by default prompts me to
- ask about the performance implications. How much, relatively &
- intuitively, am I paying for this? Would I be better off to
- arrange it so that compile is not the default on EVAL? If so,
- what is the switch for it? Is this the same control as for the
- toplevel READ-EVAL loop?
-