Optional class is just a Value
vitalyd at gmail.com
Wed Sep 19 10:55:12 PDT 2012
Agree, I like Optional as well. Also, the name implies that there's
something special about it; Value is too generic and doesn't have the same
Sent from my phone
On Sep 19, 2012 1:47 PM, "Kevin Bourrillion" <kevinb at google.com> wrote:
> For what it's worth, the Guava team still feels very happy with our choice
> of the name Optional for this construct. An Optional<String> *is* an
> optional string. It is not an "option string". And it rolls of the tongue
> a lot better than a "maybe string". It's certainly not well described as a
> "value string".
> On Wed, Sep 19, 2012 at 10:33 AM, Julian Hyde <julianhyde at gmail.com>
> > On Sep 19, 2012, at 8:47 AM, Paul Benedict <pbenedict at apache.org> wrote:
> > > I think the Optional class could be better named. I consider it a
> > negative
> > > noun -- focusing on its ability to not contain a value.
> > The name made sense to me... but then I was familiar with the similar
> > concept in Scala.
> > http://www.scala-lang.org/api/current/scala/Option.html
> > On reflection, the Scala name makes more sense. "Optional" (adjective)
> > implies behavioral (hence usually applies to an interface) whereas
> > (noun) implies structural.
> > Julian
> Kevin Bourrillion | Java Librarian | kevinb at google.com | 650-450-7126
More information about the lambda-dev