Subject: Re: setf'able?
From: Erik Naggum <erik@naggum.no>
Date: 1998/11/02
Newsgroups: comp.lang.lisp
Message-ID: <3119024739483288@naggum.no>

* Dobes Vandermeer <dobes@mindless.com>
| How do you write functions that are "setf'able".
| 
| i.e.
| 
| (setf (myfunc myparams) 24) => Sets a special value "pointed to" in some
| way by (myfunc myparams).

  others have answered with the code you need to write, but I'd like to
  change your view of setting and getting values, if I may.  a variable (or
  a generalized place, in general) is something that yields a value that
  does not change from reference to reference (or call to call).  "setting"
  the value of a variable (or a generalized place) is an "instruction" that
  it return that value until you "set" it again, as in "remember this!".
  if you think of this way, there are number of interesting and otherwise
  "read-only" places that you might want to return a different value.

  like, _setting_ the transatlantic round-trip time of IP datagrams -- your
  system could choose a different ISP, upgrade your links, move your office
  location, etc...  :)

#:Erik
-- 
  The Microsoft Dating Program -- where do you want to crash tonight?