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

Using EQ instead of EQL to compare catch tags



    From: Masinter.pa at XEROX.ARPA
    To:   COMMON-LISP at SU-AI.ARPA

    It seems clear that the "portable subset" of Common Lisp has to either
    insist that EQL be used for catch-tags, or else refuse to allow anything
    other than a symbol.

That makes very little sense to me.  Non-symbol, non-numeric catch tags are
useful.  For example, to correctly implement the contorted example on page 40,
one must create a unique catch tag at runtime (that's done quickly and portably
with CONS).  The only place I can imagine numeric catch tags being used is in
code generated by the compiler or some program-writing-program.  In either
case, care can be taken to make sure that the tag that's caught and the tag
that's thrown are EQ.

    There *are* some performance penalties for portability, you know....

Yeah, but Common Lisp tries to give a reasonable amount of flexibility to the
implementor.  Given the whole EQ not working on numbers business, I don't think
there's much more cognitive load on the programmer.

It's probably time for people to start realizing that there are real Common
Lisp implementations supporting real users Right Now.  Take a look at the
Stability paragraph on page 3.

--Skef