Subject: Re: setq setf
From: Erik Naggum <>
Date: Sat, 09 Mar 2002 22:57:05 GMT
Newsgroups: comp.lang.lisp
Message-ID: <>

* Kent M Pitman <>
| I think of the difference between SETQ and SETF as being "assignment" vs
| "side-effect" and regard it as a linguistic irritation that SETF is
| allowed to assign variables, though it obviously has a place (pardon the
| pun) in describing places.

  This distinction seems reasonable, and your explanation about doing
  something in a lambda is not lost on me, _but_ I conclude that special
  varriables are therefore different from lexical variables, in that you
  _can_ pass a symbol to a lambda and have it "side-effect" that binding,
  or, as it might be implemented, the symbol-value slot, so one should use
  SETF on special variables.  Or do special bindings offer the same kind of
  "encapsulation" that symbol-macrolet does?

| But that's just me.  I'm not really advocating anyone think like me.  I'm
| just noting that there is this other pont of view.  I'm presently torn
| about how to present this issue in books I'm working on, and am leaning
| toward just saying to use SETF in spite of my personal preference.

  There seems to be an important distinction between lexical and
  non-lexical data in here, somewhere.

  In a fight against something, the fight has value, victory has none.
  In a fight for something, the fight is a loss, victory merely relief.