[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Issue: CONDITION-RESTARTS (Version 1)
- To: Moon@STONY-BROOK.SCRC.Symbolics.COM
- Subject: Issue: CONDITION-RESTARTS (Version 1)
- From: Kent M Pitman <KMP@STONY-BROOK.SCRC.Symbolics.COM>
- Date: Thu, 9 Mar 89 18:19 EST
- Cc: KMP@STONY-BROOK.SCRC.Symbolics.COM, CL-Cleanup@SAIL.Stanford.EDU
- In-reply-to: <19890309192541.5.MOON@EUPHRATES.SCRC.Symbolics.COM>
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?