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

access to list of pending CATCH tags?



    Date: 23 Nov 84  1519 PST
    From: Dick Gabriel <RPG@SU-AI.ARPA>
    Subject: List of pending catch tags   
    Despite what many people believe, the Common Lisp designers have left
    some programs out of the Common Lisp spec, so you, the user, can have
    some fun too and write your own.
That's rather hard to believe given the plethoria of functions I've
never in my life used such as: ASINH ACOSH ATANH ... STRING-RIGHT-TRIM ...
With all those rarely-used functions as REQUIRED functions in any CL
implementation, it's hard to believe a basic debugging need like seeing
which catch tags are pending has been left for the programmer to
invent himself. More likely it was an oversight or poor design decision.

    Date: 23 November 1984 18:48-EST
    From: Kent M Pitman <KMP @ MIT-MC>
    Subject: memo-catch
    ...
    However, I assume REM's comment was for the sake of debugging, since it
    might be helpful interactively in determining how to proceed a broken
    program that had been written with ordinary primitives.
I admit my example of database application was answered by the
MEMO-CATCH above, but indeed my original idea was more for debugging
as KMP guessed correctly. Perhaps there should be two levels, a way of
getting pending catch tags that you can *always* get from program code
inside a pending catch, such as I requested an KMP concurs, for
debugging; and an explicit user-level facility such as MEMO-CATCH. But
MEMO-CATCH really should provide not just the list of tags, but also
user-level documentation for each, such as "if you use this catch tag
you'll lose all your database updates since the first of the preceding
month" and "if you use this catch tag you'll not lose any updates but
a wizard will have to patch the database back together before it can
be used again" etc. Thus I'd like the built-in CATCH to provide a
crude level of tags for the sake of debugging and graceful recovery
from gross bugs during debugging, and the user can provide an
elaborate mechanism for end-users.

    For what it's worth, a common argument against your MEMO-CATCH solution
    goes something like: ``If I'd known that was the catch I needed to
    memoize, I wouldn't have had to memoize it!''
Yup, I agree. If you need it for debugging, it should be there always
(or at least by default during debugging) instead of requiring an
explicit action each time to install it. That's the whole idea of
the LISP interprtor, if you leave things out by mistake the
debug-runtime environment has enough info around that you can diagnose
the problem from inside the error without having to modify your source
and recompile and/or reload.