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

Re: Issue: UNWIND-PROTECT-CLEANUP-NON-LOCAL-EXIT (Version 2)



I discarded the "is an error" possibility, not out of hand, but rather
because no one argued for it (Moon said in one message that we could
"wimp out" and take that option, but it didn't seem like he was favoring
it.)

I've read your message several times; I think what you are saying is
that you prefer

RETURN-INNER, RETURN-OUTER, IS-AN-ERROR (not written up), and
SIGNAL-ERROR.

in that order. Is that a correct reading of your position?


I think that your example 

  (block foo
    (block bar
      (unwind-protect
          (return-from foo 'foo)
	(return-from bar 'bar))))


is a good one and should be in the proposal: it is a situation where
RETURN-INNER and RETURN-OUTER would have the same behavior; in such a
situation, it seems clear that SIGNALS-AN-ERROR seems out of place.

Here is another case to consider:

(DEFUN UNSTOPPABLE () (UNWIND-PROTECT (LOOP) (UNSTOPPABLE)))

Doesn't this have the same "unstoppable" property, completely orthogonal
to this issue? I.e., that it cannot be aborted by an asynchronous
"interrupt" unless they happen to come in at exactly the right moment?

Maybe I should have written it as

(labels ((unstoppable () (unwind-protect (loop) (unstoppable))))
(unstoppable))