That hardly strikes me as a feature. Null pointers simplify a lot of error-checking. Don't know if what you got back was valid? As easy as checking to see if it's zero!
That hardly strikes me as a feature. Null pointers simplify a lot of error-checking. Don't know if what you got back was valid? As easy as checking to see if it's zero!
Rather than, "oh crap! every single variable could potentially be null at any time!", the few functions that can be null make you check for None / Some 'a, and that's it, no tedious null checks ever again. "Null pointers simplify a lot of error-checking.", my ass.
Contrary to ML, it doesn't require variables to be initialized when declared. The typestate system checks (statically) that they are not referenced before initialized.
What's the point, then?
Look deeper, there is a rich world of Programming Language history and research linked from Rust's FAQ. Don't cling to your Java or C/C++ null pointers.