Optional require(s) NonNull

Olexandr Demura oleksander.demura at gmail.com
Wed Oct 31 08:53:31 PDT 2012

May be we do not need Optional at all?
It does less than most of randomly chosen developers expect.
It has very limited usage and restricted applicability.

Could exception mechanism be used instead?
Like Peter Levart proposed in "inference of throws type parameters in SAMs"

2012/10/31 Remi Forax <forax at univ-mlv.fr>:
> On 10/31/2012 01:50 AM, Brian Goetz wrote:
> [...]
>> This particular example is a fine one; the set of people who are familiar with Optional in languages other than Java is probably smaller than a few percent of the Java developer base.   Claiming that this vocal minority speaks for "something the larger community wants to change" is ludicrous.  This is something a small but highly vocal fraction wants to change.  And, we did spend a great deal more time on this issue than we had budgeted for, simply because there was a vocal request from the community to consider an alternate viewpoint, which we did.  But in the end, it is our job to separate the interests of the vocal minorities / self-proclaimed elite from the interests of the greater community as a whole.
> me still thinking that Optional should not be named Option/Optional
> because people already have a strong opinion of the semantics of
> something named Optional, I fall in the same trap the first time I've
> seen Optional in the stream API, and here, as Brian says, we don't want
> that semantics. We attach meaning to class name without even reading the
> docs, we all do that, so because the concept is different, I think it's
> better to come with a different name.
> [...]
> cheers,
> Rémi

More information about the lambda-dev mailing list