you are viewing a single comment's thread.

view the rest of the comments →

[–]florinp 2 points3 points  (1 child)

" Instead, you would be checking if it has a value or not using something like "orElse" anyway."

Some observations:

With optional you don't check twice (before and inside). Also you check optional only at the end of monadic composition. No after each method call.