Optional.or name Re: RFR 8080418 Add Optional.or() (original) (raw)

Stefan Zobel spliterator at gmail.com
Mon Oct 12 08:17:12 UTC 2015


“Optional.or” is the best name so far i have come up with. The “orElse” prefix is reversed for terminal methods and i don’t want to overload that. -- Alternative suggestions: - “Optional.otherwise” A bit of a mouthful, but reasonably accurate - “Optional.mapElse" The name is not entirely accurate since it accepts a Suppler not a T, a more accurate name would be the following alternative. - “Optional.flatMapElse" This name is likely to confuse. Paul.

Actually, I don't regard "Optional.or" as a poor name.

Stefan.



More information about the core-libs-dev mailing list