Re:New Features in Java 14
by hawk_ on Tuesday March 03, 2020 @05:39PM
(#22479415)
The difference is that the choice of Optional is deliberate in the parts of code where None is a valid value. In java you have no first class way to indicate that null isn't an expected value for some variable and so type checker can't block it. In rust type checker wont let None slip in accidentally if you don't use Optional.
[ Parent
| on HN ]
There are no comments on this comment yet.