4 ms·
I have some thoughts on this code: 1. Why is decide_position returning a boolean? The function signature, even without types, doesn't really indicate that it s
by Freedom2 2y ago
I have some thoughts on this code:
1. Why is decide_position returning a boolean? The function signature, even without types, doesn't really indicate that it should return a true / false value. Perhaps a better name would be "is_position_good"?
2. Why would the memory get corrupted? Most operating systems should be able to handle such a case.
3. Why do we shut down the entire application? Surely there's a better method rather than killing the entire application due to a single boolean check.