Closed GoogleCodeExporter closed 9 years ago
Thank you for your message.
Regarding the behavior of guard and raise-continuable, I think it is intended
by R6RS.
What my understanding is:
> (let ((foo #f))
> (guard (e
> (else #t))
> (call-with-input-file "x"
> (lambda (iport)
> (set! foo iport)
> (raise-continuable 1))))
> (get-datum foo))
* (raise-continuable 1) never returns because (else #t) will be evaluated with
the
continuation and dynamic environment of the guard expression. It means that the
evaluation of (else #t) causes that the guard expression returns #t immediately.
* Because given procedure does not return, call-with-input-file do not close
port
automatically.
Please note that I may miss something since I'm not a specialist of Scheme
Programming Language.
Your comments are very welcome. Thank you!
---------
References:
R6RS Standard Libraries - 7.1 Exceptions (guard):
http://www.r6rs.org/final/html/r6rs-lib/r6rs-lib-Z-H-8.html#node_sec_7.1
R6RS Standard Libraries - 8.3 Simple I/O (call-with-input-file):
http://www.r6rs.org/final/html/r6rs-lib/r6rs-lib-Z-H-9.html#node_sec_8.3:
A message by Abdulaziz Ghuloum relate to subject "guard re-raising and
continuable
exceptions" in [r6rs-discuss]:
http://lists.r6rs.org/pipermail/r6rs-discuss/2008-July/003527.html
Original comment by y.fujita...@gmail.com
on 8 Sep 2008 at 4:36
> A message by Abdulaziz Ghuloum relate to subject "guard re-raising and
continuable
exceptions" in [r6rs-discuss]:
> http://lists.r6rs.org/pipermail/r6rs-discuss/2008-July/003527.html
OK, the above one says that it is intended by R6RS, so you are right and this
issue
is bogus.
(Anyway the behavior of re-raising an exception may be worthy of attention :)
I'm glad to clarify my misunderstanding by your comment. Thanks a lot.
Original comment by tabe.fix...@gmail.com
on 9 Sep 2008 at 2:23
Thank you for your reply.
Please keep in touch R6RS and Ypsilon!
-- fujita
Original comment by y.fujita...@gmail.com
on 9 Sep 2008 at 3:00
Original issue reported on code.google.com by
tabe.fix...@gmail.com
on 7 Sep 2008 at 5:10