[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A few random I/O proposals
> 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.