Optional
A return type that makes "there might be nothing" impossible to ignore.
Optional was added for one job: letting a method say "there might be nothing here" in its signature instead of in its documentation. Used for that it removes a whole class of bug; used as a field type or a parameter it adds one. The topic is as much about where it does not belong as where it does.
Contents
8 cardsnot started