Proposal: end lazy IO results with errors/exceptions
Eric Mertens
emertens at gmail.com
Fri Jul 25 04:05:20 UTC 2014
-1
I think that this change would make otherwise reasonable uses of
hGetContents on large files more likely to end with an exception. It seems
perfectly reasonable to use hGetContents to stream data from a either a
large source or an infinite source (say a pipe or socket or /dev/urandom).
Perhaps you're streaming those bytes into another form, who knows. In any
case, file descriptors are precious and it would make sense to hClose the
file when you're done with it rather than wait and hope that the GC gets to
closing your file.
With this change we'd be introducing asynchronous minefields into code that
don't need to exist.
On Thu, Jul 24, 2014 at 8:50 PM, John Wiegley <johnw at newartisans.com> wrote:
> +1 from me.
>
> John
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>
--
Eric Mertens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20140724/4fba870d/attachment.html>
More information about the Libraries
mailing list