Non interference enforcement

Remi Forax forax at univ-mlv.fr
Wed Sep 26 06:35:05 PDT 2012


On 09/26/2012 03:28 PM, Brian Goetz wrote:
> We do piggyback on some degree of fail-fast when we use their iterators.

yes, but using an iterator is not mandatory, right ?

Rémi

>
> On 9/26/2012 9:26 AM, Remi Forax wrote:
>> We currently ask users to write lambdas that doesn't interfere with the
>> source collection
>> of a stream but it's not enforced in the code.
>>
>> By example,
>>    list.stream().forEach(e -> { list.remove(e); });
>> may works or not depending how the pipeline is implemented.
>>
>> This is a serous departure for the current way java.util collections 
>> works
>> and I wonder if we should not keep the fail-fast guarantee for those
>> collections.
>>
>> Rémi
>>



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