I think that is because you usually write your functions to manipulate data, and then lift it to Optional
using map
and similar functions. This adds the default Optional
behavior to it.Of course, there might be cases, when it is necessary to write your own auxilary function that works on Optional
.
↧
Answer by Danil Gaponov for Why should Java 8's Optional not be used in arguments
↧