Lieven Marchand wrote:
>
> richard@starburst.demon.co.uk (Richard Wendland) writes:
>
> > Nice. Updater functions are another nice feature I've not come across
> > in another language.
>
> Common Lisp SETF expander functions
>
> It's indeed a nice feature.
It may be a nice feature; it *isn't* the same feature.
The difference is that in Common Lisp you have to write a setf-expander for
each updater name, ie this is essentially a compile-time activity. It's
much harder (if possible at all; my Steele is at home) to write the
equivalent of
define exhibit( f, x ); 42 -> f(x) enddefine;
where the updater is determined dynamically. This matters more in Pop,
of course, because so many more things (eg vectors, arrays, properties)
are either functions or contrive to look like them. My own code passes
properties as parameters all over the place; it would be gobsmackingly
awful if I had to define umpteen setf forms to access them by the many
different names I call those parameters!
--
Chris "xved on linux! whee!" Dollin
|