[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(setf (not x) y) => (setf x (not y))
Date: Tue, 22 Jul 86 12:54 EDT
From: Guy Steele <gls@Think.COM>
Fine. I don't see any reason why a user shouldn't be allowed
to do a DEFSETF of NOT. I am not crazy about installing it as
a requirement in the language. Years ago I sent out examples
involving * and SQRT, looking something like this:
(setf (sqrt x) y) -> (setq x (* y y))
(setf (* x y) z) -> (setq x (/ z y))
(setf (* x x) z) -> (setq x (sqrt z))
We could do it, but it would be wrong.
Some things are more wrong than others. Anyway, an argument against
telling the user to DEFSETF of NOT is that some systems may complain if
more than one use tries to do that, on the grounds that different users
are stepping on each other's toes. Symbolics is such an implementation.
I think SETF of NOT has a fairly concise semantic meaning and is
generally useful, and at least 90% correct, if not higher.