[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(EQUAL "a" "a") -> ()



    Date: 30 September 1980 23:49-EDT
    From: Mark L. Miller <MILLER at MIT-AI>
    To:   KMP, BARMAR
    cc:   JHendler at BBNA, JShelton at BBNA, TBlocker at BBNA,
          Pattermann at BBNA, Kehler at BBNA, BUG-LISP
    Re:   (EQUAL "a" "a") -> ()

	Date: 29 SEP 1980 0910-EDT
	From: KMP at MIT-MC (Kent M. Pitman)
	The primary use of "..." is to get an object which prints a 
	certain way... "..." is defined on non-Multics Maclisp to return 
	an UNINTERNED SYMBOL which has been SETQ'd to itself (so that it 
	self-evaluates).

    ... let's not criticize the complaint -- it is a legitimtate gripe -- 
    i.e., the semantic rule of thumb that "if two things LOOK THE SAME they 
    are almost always EQUAL" has been violated, and thus this behavior can
    reasonably be called a "bug".
-----
This doesn't follow at all. Bugs are when things don't behave as documented
or as carefully thought out. Funarg problems arise from evaluators behaving
according to rules of thumb, yet it is the evaluator, not the programmer
which is defficient when the funarg is not correctly resolved. The reason
is that there are more deep-rooted (admittedly hard to model as `rules of 
thumb') reasons for wanting the more complex behavior. GENSYM's already 
violate the rule and for good reason. If it were going to be a bug to have
things that look alike, then we wouldn't have different obarrays and gensyms
and all that -- we'd have a `definition' of EQUAL that said this was to be
true. 

Personally, I think that EQUAL ought NOT to do the gratuitous string-equal
for you -- even in a real lisp. I think it's operation should be to determine
if you have a collection of objects which are EQ at the atomic level. Strings
being atoms, I don't see "abc" as equal to "abc". If you want a string
comparison of things, you should ask for it explicitly -- that's going to
the subatomic level and should require a different observation. That's just
my opinion, though, and I think people would resent my suggesting it be 
changed, so I'll pass on that point for now.

-kmp