4 ms·
I know the author claims that there's a meaningful similarity beyond the names. But that's where I disagree. I get that a NULL pointer is in some meaningful wa
by ursus_bonum 11y ago
I know the author claims that there's a meaningful similarity beyond the names. But that's where I disagree.
I get that a NULL pointer is in some meaningful way not a pointer. Because it literally isn't pointing to anything. It is not the case that NUL is a char that is not a char. NUL is a perfectly good char. Some functions treat it specially, but other than that it's just a regular char.
Even the sentinels similarity is quite weak. NULL is a sentinel that indicates "no valid object" whereas NUL is a sentinel that indicates the end of a perfectly valid object. Notice how we're not having this discussion about '\n' or the whitespace chars in general, even though they're also treated as sentinels by some functions.