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

Using EQ instead of EQL to compare catch tags



    Date: Mon, 12 Nov 1984  13:51 EST
    From: Skef Wholey <Wholey at CMU-CS-C.ARPA>

    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).

Not true.  General BLOCK and RETURN-FROM do not need to be implemented
using CATCH/THROW.  (It might actually make sense to do it just the
other way around, as is done in a Lisp implementation I won't name.)
Fine if an implementation does so, but such implementation detail
needn't enter into discussions of language design (or manual revision).

I suspect that any use of non-symbol CATCH could just as easily be
implemented using BLOCK and lexical closures.  Just to add my two cents
worth, I tend to think of CATCH as a binding form, and therefore think
it should work on the same kinds of things that PROGV works on, but it's
probably too late to make this consistent (either by allowing variables
named by non-symbols or by forbidding non-symbol CATCH tags).  And given
that non-symbol tags are allowed, and that there needn't be any
performance penalty (as Kent rightly points out), the EQL definition is
the right thing.

Jonathan