logoalt Hacker News

amelius • yesterday at 4:56 PM • 1 reply • view on HN

Because it didn't have nul-terminated strings.


Replies

phba • yesterday at 8:31 PM

Not sure if you are being sarcastic. Pascal strings are first class citizens, so it's trivial to add null-termination. Delphi actually does this to allow typecasting.

C, for example, doesn't have strings. It has pointers to memory that might contain characters and, if you are lucky and the stars are aligned, a zero to mark the end. I'll never understand how C strings were accepted as a string representation and not the mad source of bugs and insanity that they are.

➕ show 1 reply