[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
A few random I/O proposals
Date: Thu, 28 May 92 09:06:54 -0400
From: jmiller@crl.dec.com
X-Mts: smtp
> Since Scheme has no error/condition system yet, and since having
> OPEN return #f for failure is an imperfect solution for reasons
that > have been well covered, how about having OPEN accept a
failure > continuation argument?
Bravo, I think. I'd alter that just slightly. I'd like a
signature of something like:
(open-input-file file-name) as is.
(open-input-file file-name error-handler) if the open fails
(i.e. if the one argument version would signal an error),
error-handler is called with an implementation-specific
argument describing the reason and the result of this call is
returned from open-input-file (i.e. open-input-file "tail
recurses" into error-handler).
With this change from your suggestion, I think Dick might be happy.
And, for the record, Dick wasn't the only one who wanted CALL/CC
removed. I voted that way as well.
--Jim
Exception handlers still want the ability to "throw" to some
previously saved continuation. So you still need CALL/CC or at least
"downward only" continuations, i.e. CATCH.
Jim