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

[no subject]



    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.  Things like EQ are something you shouldn't depend on
    any more than EQ-ness of lists. "..." is defined on non-Multics
    Maclisp to return an uninterned symbol which has been SETQ'd to
    itself (so that it self-evaluates). You should normally check
    .INFO.;LISP NEWS for descriptions like this as almost all recent
    ITS features are documented there in some form or another. -kmp

This doesn't completely answer your question.  You asked why
(EQUAL_"foo" "foo") returned nil not (EQ "foo" "foo").  EQUAL compairs
things in all kinds of ways, numbers for numeric equality, conses for
EQUALness of cars and cdrs, and strings (in lisps that have them) for
same-name-ness, but for symbols it uses EQ, and that is what you are
stuck with.  Thus since ITS MacLisp doesn't really have strings but
makes symbols instead (as KMP explained), the function EQUAL won't
behave "correctly" with respect to these fake strings.  This is OK,
because we put the /" macro into ITS MacLisp primarily so that we
could write (princ "Fatal Error!!!") and have it work on ITS and in
places that really do have strings.

The function SAMEPNAMEP can be used to compare these fake strings to
see if they have the same name, and will also work for that purpose in
lisps that have real strings.  If you are doing something simple, this
may be what you are looking for.