RFR : JDK-8001642 : Add Optional<T>, OptionalDouble, OptionalInt, 	OptionalLong
    Remi Forax 
    forax at univ-mlv.fr
       
    Wed Mar  6 11:44:53 PST 2013
    
    
  
On 03/06/2013 08:34 PM, Brian Goetz wrote:
>>
>> For Option lovers, one way to view this: it enables someone to 
>> provide their own Option instead of the one we provide. Right? If 
>> not, then I'm less favorable.
>>
> No, not right.  It prevents people from distinguishing between a 
> stream that is empty and a stream containing only the "orElse" value. 
>  Just like Map.get() prevents distinguishing between "not there" and 
> "mapped to null."
>
I don't know if 'it' is my proposal or not.
If it is, yes you can use any Option implementations you want because 
you know if the value is present or not and if the value is present, you 
know the value. So you can return the Option implementation you want.
Rémi
    
    
More information about the lambda-libs-spec-experts
mailing list