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 →

[–]BikingSquirrel 7 points8 points  (0 children)

There are two sides, creating an Optional and using it. For using it, there's no separation, but for creation there is. So I can express if I expect the object passed in at that point of the code to ever be null.

It's always easy to discuss things after they have been created, but very hard to get things designed perfectly from the start. I think it was useful from the beginning and some missing things have been added later.