A disclaimer or two for Optional
Brian Goetz
brian.goetz at oracle.com
Sun Oct 20 08:41:39 PDT 2013
> It's fine to warn people in general about the potential pitfalls that
> exist today or that might arise in the future due to new language
> features. It just seems strange to focus on Optional, a class whose name
> practically shouts to the user, "Don't synchronize on me!"
Its not *just* Optional. For example, the JSR-310 folks are listening
to this discussion with interest, since all of their new date-time
classes are morally values, and they would understandably prefer to not
have them all boxed.
But we should only focus on stuff that's new in 8; the previous classes
that are morally values are likely too far polluted with existing
usages. Its only the new value-ish classes in 8 that we have a fighting
chance of turning into values in a future version.
More information about the lambda-libs-spec-experts
mailing list