MumbleCloseable goes backward

Paul Sandoz paul.sandoz at oracle.com
Thu Jun 27 03:57:49 PDT 2013


On Jun 27, 2013, at 12:51 PM, Remi Forax <forax at univ-mlv.fr> wrote:
>> - R could be Stream.
> 
> yes, this has to be documented, but because the result value will be a closed Stream,
> there is no issue, it will bark at first use.
> 

>> 
>> - ain't gonna work for flatMap:
>> 
>>   Files.walk(dir, sp-> sp.flatMap(p -> Files.lines(p, Function.identity()))...);
> 
> you can return void/null, no ?
> 

How would the stream of line elements be processed by flatMap?


>> 
>> - much harder to read than:
>> 
>>   Files.walk(dir).flatMap(Files::lines)...
> 
> which leak resources.
> 

How so?

Paul.


More information about the lambda-libs-spec-experts mailing list