home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / lisp / mcl / 1980 < prev    next >
Encoding:
Internet Message Format  |  1993-01-11  |  1.5 KB

  1. Path: sparky!uunet!olivea!apple!cambridge.apple.com!hall@allegra.att.com
  2. From: hall@allegra.att.com (Bob Hall)
  3. Newsgroups: comp.lang.lisp.mcl
  4. Subject: Re2: MCL support for MOP
  5. Message-ID: <9301112204.AA21799@brazil.cambridge.apple.com>
  6. Date: 11 Jan 93 21:55:56 GMT
  7. References: Brent Benson's message of 11 Jan 93 15:32:00 GMT <BRENT.93Jan11103200@rcx1.ssd.csd.harris.com>
  8. Sender: info-mcl-request@cambridge.apple.com
  9. Lines: 35
  10. Approved: comp.lang.lisp.mcl@Cambridge.Apple.C0M
  11.  
  12.  
  13.     From: brent@ssd.csd.harris.com (Brent Benson)
  14.     Date: 11 Jan 93 15:32:00 GMT
  15.  
  16.     I'm not convinced that it is hard to tree shake code that does not
  17.     contain calls to eval.  I would appreciate it if someone could tell me
  18.     about other difficulties.
  19.  
  20. ;There's the general problem of calls to the various forms of READ
  21. ; (lots of data files in the world are LOADed (involving calls to READ))
  22. ;and higher-order operators like funcall
  23. ;and the behavior of fboundp
  24.  
  25.   (funcall (read) (read))
  26.  
  27. ;or
  28.  
  29.   (loop ;the proverbial British Museum Monkeys program
  30.     (let ((rand (intern (generate-random-string))))
  31.       (when (symbol-function rand)
  32.         (when (catch-and-ignore-all-errors
  33.                 (funcall rand))
  34.           (format t "Found a nonNIL zero-arg function: ~s" rand)))))
  35.  
  36. ;How about this macro?
  37.  
  38. (defmacro mycall (x y) `(,x ,y))
  39.  
  40. ;Or even
  41.  
  42. (fboundp 'nreconc) ;which presumably returns a different value if nreconc
  43.                    ;is "shaken" out of the image.
  44. (fboundp (read))
  45.  
  46. -- Bob
  47.