logoalt Hacker News

realharo • today at 5:28 PM • 1 reply • view on HN

The type of the value in C is `char*`.

That's what led some people to write code where it crashes without checks. Which is still their mistake. But if the type was something that can't be implicitly used like an always-present value, that would have prevented the situation, even with those same people.


Replies

uecker • today at 7:47 PM

A pointer is a type where a null pointer can't be used as a regular value but leads to a trap when dereferenced.