
On Fri, Jul 25, 2014 at 11:46 AM, Dan Doel
For an exception to happen, one has to force more than what was already forced when the handle was closed. The vast majority of instances of this---as far as I can tell---are people immediately closing handles they've lazily read from, and an exception is probably more informative than the empty input they currently get.
Perhaps Eric's suggesting that the existing behavior provides a simple asynchronous signalling mechanism? When reading from an infinite source, an empty read signals that the source handle was closed elsewhere in a different thread. The reading thread then acts accordingly, say, branching out of a loop. (I'm neutral on the proposal and on the haskelliness of everything said so far. I'm just trying to understand what everyone's saying in this discussion.) -- Kim-Ee