[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] valid implementation of call-with-input-file?
On Mon 20 Aug 2012 12:52, Alaric Snell-Pym <alaric@x> writes:
> [I]f we omit raise-continuable, people can still make their own.
This is a great thing!
> What if somebody writes a coroutine library using call/cc and one of
> the coroutines uses call-with-input-file, as coroutines are often used
> for producer/consumer relationships and files make good producers of
> input data?
Then the file stays open until a normal or an exceptional return
happens. Note that call/cc is neither of these. (What is an
exceptional return? A raise to a guard outside the scope of the
> Making call-with-input-file close FDs on all forms of exit
That is not my argument, otherwise I would have suggested dynamic-wind.
Scheme-reports mailing list