Optional class is just a Value
Kevin Bourrillion
kevinb at google.com
Wed Sep 19 10:41:14 PDT 2012
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> wrote:
> 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 "Option"
> (noun) implies structural.
>
> Julian
>
>
--
Kevin Bourrillion | Java Librarian | kevinb at google.com | 650-450-7126
More information about the lambda-dev
mailing list