Unwind-protect Marc Nieper-Wißkirchen (09 Oct 2022 09:56 UTC)
|
Re: Unwind-protect
Shiro Kawai
(09 Oct 2022 10:41 UTC)
|
Re: Unwind-protect
Marc Nieper-Wißkirchen
(09 Oct 2022 11:21 UTC)
|
Re: Unwind-protect
Shiro Kawai
(09 Oct 2022 12:46 UTC)
|
Re: Unwind-protect
Marc Nieper-Wißkirchen
(09 Oct 2022 13:07 UTC)
|
Re: Unwind-protect
Shiro Kawai
(09 Oct 2022 13:26 UTC)
|
Re: Unwind-protect
Marc Nieper-Wißkirchen
(09 Oct 2022 13:58 UTC)
|
Re: Unwind-protect
Shiro Kawai
(09 Oct 2022 22:50 UTC)
|
Re: Unwind-protect
Marc Nieper-Wißkirchen
(10 Oct 2022 05:57 UTC)
|
Re: Unwind-protect
Marc Nieper-Wißkirchen
(10 Oct 2022 07:24 UTC)
|
Re: Unwind-protect
Shiro Kawai
(10 Oct 2022 07:25 UTC)
|
Re: Unwind-protect
Marc Nieper-Wißkirchen
(10 Oct 2022 07:39 UTC)
|
Re: Unwind-protect
Shiro Kawai
(10 Oct 2022 08:57 UTC)
|
Re: Unwind-protect
Marc Nieper-Wißkirchen
(10 Oct 2022 08:59 UTC)
|
Re: Unwind-protect
John Cowan
(09 Oct 2022 15:03 UTC)
|
Re: Unwind-protect
Marc Nieper-Wißkirchen
(09 Oct 2022 15:13 UTC)
|
Re: Unwind-protect
Marc Nieper-Wißkirchen
(09 Oct 2022 15:39 UTC)
|
Re: Unwind-protect
Marc Nieper-Wißkirchen
(09 Oct 2022 16:13 UTC)
|
Re: Unwind-protect
Lassi Kortela
(09 Oct 2022 15:41 UTC)
|
Re: Unwind-protect
Marc Nieper-Wißkirchen
(09 Oct 2022 16:11 UTC)
|
Re: Unwind-protect
Marc Nieper-Wißkirchen
(28 Oct 2022 11:08 UTC)
|
Re: Unwind-protect
Vincent Manis
(28 Oct 2022 18:53 UTC)
|
Re: Unwind-protect
Marc Nieper-Wißkirchen
(28 Oct 2022 18:58 UTC)
|
Re: Unwind-protect
Vincent Manis
(28 Oct 2022 19:14 UTC)
|
Re: Unwind-protect
Marc Nieper-Wißkirchen
(28 Oct 2022 19:28 UTC)
|
Re: Unwind-protect
Arthur A. Gleckler
(28 Oct 2022 19:31 UTC)
|
John Cowan suggested that SRFI 226 should include a version of Common Lisp's unwind-protect suitable for Scheme. In [1], I replied after some discussion with the following proposal for a definition of a Scheme unwind-protect: (define-syntax unwind-protect (syntax-rules () ((unwind-protect protected-form cleanup-form) (call-with-continuation-barrier (lambda () (dynamic-wind (lambda () (values)) (lambda () protected-form) (lambda () cleanup-form))))))) As I think it is essential to get this famous form right when included in a fundamental SRFI like SRFI 226, I would like to hear more opinions on the above form. (It should be noted, that Scheme procedures like `call-with-input-file` are not based on unwind-protect semantics.) Should there be no consensus on unwind-protect, it is probably better to reserve an extra SRFI for it (which, in turn, can depend on SRFI 226). Thanks for taking a look, Marc -- [1] https://srfi-email.schemers.org/srfi-226/msg/20888154/