Re: [Scheme-reports] file-error?, read-error?, and specificity of error objects
John Cowan 06 Jan 2013 04:59 UTC
Andy Wingo scripsit:
> My suggestion would be to remove all mention of "file-error?" and
> "read-error?" from the report, and include in the larger report modules
> which specify certain errors from those procedures.
I reconstruct the reasoning of the WG thus:
First, we decided to accept the pragmatic wisdom of R5RS that only
certain exceptional situations were required to be signalable in all
implementations, namely when an input file cannot be opened as a port,
when an EOF is detected in the middle of a datum, and when an attempt
was made to create an unsupported type of environment. To these we
added the fourth type, the simple error signaled by `error`.
The next idea was that if an error could be signaled, it could be trapped.
Finally, in order to be able to safely trap errors from a distance
and still determine which of the four known types of error condition was
involved, predicates that distinguished them were introduced. In the
final vote, the environment-type predicate was omitted as insufficiently
useful.
> As it is, I think most implementations will (define (file-error? x) #t),
That doesn't conform: returning #f would do so, though at the expense
of utility.
--
John Cowan cowan@ccil.org http://www.ccil.org/~cowan
C'est la` pourtant que se livre le sens du dire, de ce que, s'y conjuguant
le nyania qui bruit des sexes en compagnie, il supplee a ce qu'entre eux,
de rapport nyait pas. --Jacques Lacan, "L'Etourdit"
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports