3 ms·
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 th
by hawk_ 7y ago
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.