[r6rs-discuss] [Formal] HIgher-order procedures should not interfere with exceptions

From: Jason Orendorff <jason.orendorff>
Date: Thu Oct 5 15:02:31 2006

---
This message is a formal comment which was submitted to formal-comment_at_r6rs.org, following the requirements described at: http://www.r6rs.org/process.html
---
Submitter: Jason Orendorff
Submitter email: jason.orendorff_at_gmail.com
Issue Type: Enhancement
Priority: Minor
Component: Base library (among others)
Report Version: 5.91
Summary: Higher-order procedures should not interfere with exceptions.
My apologies if this is already in R5.91RS, but I couldn't find it.
It doesn't appear procedures like (map) and (for-each) are forbidden
from installing exception handlers that interfere observably with the
expected behavior (I hope the expected behavior is clear!).  As these
procedures are very often called "invisibly" via macros and whatnot,
such a guarantee would nicely reduce the number of unusual cases that
must be considered when reasoning about code.
I'd like to say, simply, "standard procedures don't install exception
handlers or interfere with exceptions at all unless they are specified
to do so."
Hmm.  I guess that sort of wording might cause problems for functions
like call-with-input-file that are allowed to do automatic cleanup.
You could instead specify something slightly weaker requiring the
standard procedures to re-raise any exceptions raised to them.
If you wish to leave a further out for implementation cleverness, you
could add an overriding rule that any procedure may raise a `&serious`
exception pretty much at any time, even after receiving some other
exception in this way.  (I don't know why an implementation might want
this loophole, so maybe it's unnecessary.  But as an implementor I'm
not experienced enough to know, and as a user I would accept this
loophole.)
-j
Received on Thu Oct 05 2006 - 11:01:59 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC