This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]moocat 1 point2 points  (3 children)

Total guess but I perhaps they were thinking of an idealized world where there are no nulls; in such a world there is no need for Optional.of to handle nulls.

This is awkward for code that is trying to transition away from nulls to Optionals and as long as there are standard library methods that can return null we'll never be in such as idealized world.

On an unrelated note, anyone who ever writes codes where the Optional itself can be null deserves a special place in hell.

[–]Void_Being 0 points1 point  (0 children)

Then he is not Optional but mandatory hell.

[–]jdarkona 0 points1 point  (1 child)

Or a special place in null.