[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(setf (not x) y) => (setf x (not y))
- To: Guy Steele <gls@Think.COM>, DCP@QUABBIN.SCRC.Symbolics.COM, Fahlman@C.CS.CMU.EDU
- Subject: (setf (not x) y) => (setf x (not y))
- From: David C. Plummer <DCP@QUABBIN.SCRC.Symbolics.COM>
- Date: Tue, 22 Jul 86 18:26 EDT
- Cc: common-lisp@SU-AI.ARPA
- In-reply-to: <860722125418.3.GLS@BOETHIUS.THINK.COM>
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.