3 points | by birdculture 15 hours ago ago
1 comments
I guess this is exactly why java.util.Optional is a single class instead of a hierarchy of EmptyOptional for Optional#empty() and NotEmptyOptional for non null values, then true polymorhphic dispatch would be leverage for #isEmpty and other members.
I guess this is exactly why java.util.Optional is a single class instead of a hierarchy of EmptyOptional for Optional#empty() and NotEmptyOptional for non null values, then true polymorhphic dispatch would be leverage for #isEmpty and other members.