3 ms·
The difference is all values are valid. In C, you can't know that a `char *` is safe to dereference.
by eridius 8y ago
The difference is all values are valid. In C, you can't know that a `char *` is safe to dereference.
- dkersten 8y agoGarbage but valid values are, in my opinion, much harder errors to catch because they can silently corrupt data, than a simple crash/null pointer exception. I'm not a fan of null (option types seem better -- which V does say it has), but defaulting to an "empty" value isn't the answer IMHO as it makes it much harder to debug by obscuring that there's a problem at all. You may not realise that the 0 is actually an "empty" and not a valid 0 until you realise all of your calculations are wrong, months later.