Re: Using methods on (setf foo)?
From: Bruno Haible (bruno_at_clisp.org)
Date: 10/21/04
- Next message: Szymon: "Re: Why Lisp supposedly "sucks for game development""
- Previous message: Brad Parker: "Re: Another way to get a Lisp Machine"
- In reply to: Peter Seibel: "Using methods on (setf foo)?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 21 Oct 2004 15:29:31 GMT
Peter Seibel <peter@javamonkey.com> asked:
>
> On the other hand, mightn't it violate the principle of
> least astonishment to have a simple "assignment" have such dramatic
> side effects?
No, that's essentially why the accessor methods are part of generic
functions: So that programmers can add bookkeeping updates.
People who want just the "simple assignment" can use
(setf (slot-value playlist 'songs) ...)
as a last resort.
Bruno
- Next message: Szymon: "Re: Why Lisp supposedly "sucks for game development""
- Previous message: Brad Parker: "Re: Another way to get a Lisp Machine"
- In reply to: Peter Seibel: "Using methods on (setf foo)?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|