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

Issue: CONDITION-RESTARTS (Version 1)



    Date: Thu, 9 Mar 89 14:25 EST
    From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>
    ...
    I still believe my suggestion would be an improvement, but I think
    even better would be 

      (WITH-CONDITION-RESTARTS signal-form &rest restart-clauses)
    where signal-form must be an invocation of SIGNAL, ERROR, WARN, or
    perhaps a few others, or a macro that expands into such an invocation.
    WITH-CONDITION-RESTARTS must signal an error at all levels of safety if
    it does not recognize the signal-form.  This is "weird" because it uses
    a form for something other than evaluation (but not unprecedented; this
    is exactly what SETF does).  The advantage is that it just nests with an
    existing syntax instead of inventing a new, awkward syntax.

I thought about this. I felt guilty about suggesting it without suggesting
an extension mechanism. However, I agree that practical experience with the
Lispm suggests that the extension mechanism is not really needed. People
nearly always use an explicit call to one of these.

    Note that I stole the "good name" WITH-CONDITION-RESTARTS for this
    commonly used syntax.  The less commonly used primitive that just sets
    up the restarts without signalling doesn't need as good a name.

I suppose it woudl be too yucky to consider saying that RESTART-CASE has
this effect when its argument happens to be (or macroexpand into) a call
to ERROR, SIGNAL, etc. huh?

The justification being that these are lexically recognizable as really
associated with the signal. 

That would leave the name WITH-CONDITION-RESTARTS available for what
you called ...-INTERNAL, and would eliminate the need for this primitive
as an explicit thing altogether.

Thoughts?