[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
P?
Date: Mon, 3 Mar 86 10:58 EST
From: Guy Steele <gls@THINK-AQUINAS.ARPA>
Personally, I am content to say that "?" does not get
attached to any predicate which has a root which contains no
alphabetic characters. That is, that ">" is allowed to be a
contraction for "greater?" rather than just "greater", so ">?"
is like saying "greater??". We used a similar reasoning for
not putting "!" on the end of "SET" in T, since "SET!" is
redundant. Any assignment is by definition destructive and
setting an "!" after SET is effectively redundant and just
makes code look ugly. I think the proponents of the name
"SET!" would say that assignments -should- look ugly, and to
that I can only say that I disagree.
I think that SET! should be an assignment primitive, and SET should
construct a set (maybe meaning the same as the Common Lisp REMOVE-DUPLICATES).
This ambiguity about the meaning of "set" in Lisp has always bothered
me, and "!" is the best means of disambiguation I have seen yet.
Anyway, if that was your only concern, I would say you should call set
something else -- BIND, ASSIGN, ATTACH, NAME, or whatever. I guess I
kinda like ASSIGN. There are plenty of names that could be chosen.
The "!" is ugly and inconsistent on SET because it suggests that it is
closely related to the other operators which have "!" in their names.
I don't think it's very closely related since its side-effect occurs a
level up (in 3-lisp style) from the other "!" functions.
I believe that the authors of SETF did us a great disservice by
suggesting that SETF should be able to both assign variables and
modify structures. Anyone who's ever tried to code SETF knows full
well that the variable situation has to be handled by a special
case. That special case is the clue that tells you that something
is wrong in the model which tries to unify the two ideas.