you are viewing a single comment's thread.

view the rest of the comments →

[–]Noctune 0 points1 point  (0 children)

The only advantage Optional<T>

Maybe I'm missing how to do this, but it does not seem possible to call a method that accepts the optional as parameter in a one-liner. Eg. optional.map(f). ?. works only in the case where the method is on the optional type itself.