Where has the map method on Optional moved? (original) (raw)
Tim Peierls tim at peierls.net
Tue Feb 26 05:02:55 PST 2013
- Previous message: Where has the map method on Optional moved?
- Next message: Where has the map method on Optional moved?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, Feb 26, 2013 at 7:49 AM, Paul Sandoz <paul.sandoz at oracle.com> wrote:
Keep Optional, and keep it lean and mean. (At least as lean as the Guava Optional.)
I notice Guava's Optional has a transform method:
Right -- "at least as lean". But leaner is better. I haven't used the transform method. It feels like the top of the slippery slope that leads to monstrosities like Map<String, Optional>.
One of the reasons Doug Lea is not an Optional fan is fear of things like Collection<Optional>, something that is less likely to happen with a minimalist Optional.
Especially so if we make it more difficult by removing the hashcode and equals methods.
Yes! With docs explaining why.
--tim
- Previous message: Where has the map method on Optional moved?
- Next message: Where has the map method on Optional moved?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the lambda-libs-spec-observers mailing list