"daniel radetsky" <[EMAIL PROTECTED]> writes:
>> My idea is of something like this:
>> (iter (for x in-stream (open-file .....) close-stream t))
That's not a bad idea, but it would be nice if close-stream defaulted to
true.
> Why should it close the stream, especially when streams are generally
> created inside UNWIND-PROTECT-based macros?
That is not the case I most commonly use. Typical usage is:
(iter (for x :in-stream (make-my-stream))
...)
This is shorter and more convenient than the equivalent (assuming the
CLOSE-STREAM option):
(with-open-stream (s (make-my-stream))
(iter (for x :in-stream s :close-stream nil)
...)
And you don't even really need the CLOSE-STREAM option in this case,
since all we would do is close the stream twice.
(Of course, Both of these have a CLOSE inside an UNWIND-PROTECT block.)
Cheers,
Chris Dean
_______________________________________________
iterate-devel site list
[email protected]
http://common-lisp.net/mailman/listinfo/iterate-devel