4 ms·
(1) It's true that a sentinel value like NULL can cut cycles. That's low-level code though, and not high-level code. I'd suggest that most code is (should be hi
by paulddraper 11y ago
(1) It's true that a sentinel value like NULL can cut cycles.
That's low-level code though, and not high-level code. I'd suggest that most code is (should be high level).
(2) It is true that you may have uninitialized values. There are several ways to address it. Java will not allow you to use uninitialized local variables. C/C++ leaves the values of some uninitialized variables undefined. There are several possible approaches. Treating null as a normal thing is not a good approach, though.