logoalt Hacker News

Guvanteyesterday at 3:27 PM1 replyview on HN

Null terminated strings were an intentional compromise, known to be inferior for execution but superior for memory

Null being an "allowed" value for pointers is the mistake e.g. what became nullptr. "Allowed" because garbage values are garbage.


Replies

account42yesterday at 3:36 PM

Think of the alternative where we'd be dealing with endless issues because someone though 255 or 2^16-1 characters ought to be enough for everyone.

show 1 reply