Primitive streams and optional

Doug Lea dl at cs.oswego.edu
Wed Nov 21 07:48:49 PST 2012


On 11/21/12 09:27, Brian Goetz wrote:
>> I prefer the use of Optional<Integer>. I could live, begrudgingly, with
>> OptionalInt, but i don't think there is a strong technical requirement for
>> it.
>
> The argument against OptionalInt vs Optional<Integer> is basically "OMG, N
> more classes."  If we did Doug's "Numeric" trick, we could get away with one
> new OptionalNumeric class.
>

The logic of my initial proposal for this was linked to
the uniform policy of: null means there is nothing there.
Having lost that argument, I don't see any way out of
cascading named Optional<BoxedType>  types and someday
Optional<Optional<BoxedType>> and so on.

-Doug






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