[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New FILEPKG command: INITVARS; also RPAQ? etc.



One thing that has to be considered about this feature is how to load "patch"
files so that the INITVARS vars *do* get reset;  the LISPM people have some
trivial little thing to override the non-reSETting nature of a CommonLisp 
DEFVAR when a "patch" file is loaded, and I don't remember exactly how it
works, but I'm sure almost any little trick will do once the problem is faced.

Re RPAQ? (which looks equivalent to the MacLisp SETQ-IF-UNBOUND), I've
often wanted yet a third version of SETQ which does the setqing only if the
value is non-null (but returns the value obtained regardless).   See example
below.
I've also heard lots of other people complain about  Lisp's lack of "pronouns" a la
the "IT" of lispx;  SETQ-if-non-null catches some high percentages of these
cases.  Lack of "pronouns" means that you often see code like
       (IF (GET X 'FROBULATE) THEN (PRINT (GET X 'FROBULATE)))
where you'd like to write
       (IF (GET X 'FROBULATE) THEN (PRINT it))

Example use of SETQ-IF-VALUE-NON-NULL:
    (COND 
      ((SETQ.IFNN  WHATTODO  (FIND.MORE.WORK))
         (CARRYON.ANEW  WHATTODO))
      ((ASKUSER ...if I should just try "polishing-up" the old some more ...)
         (POLISHUP.OLD  WHATTODO))
      (T (GO AROUNDLOOP)))