logoalt Hacker News

smackeyackytoday at 2:44 AM4 repliesview on HN

Zero terminated strings were the basis for an awful lot of useful software. Calling them the biggest mistake in computing is a bit OTT.

I haven’t programmed anything Pascal related for 30+ years but I dimly remember thinking at the time that I wished the string system wasn’t so hard to use.


Replies

asdfasgasdgasdgtoday at 3:12 AM

That useful software would not have been less useful if the strings in it were represented as size + buf.

show 1 reply
ComputerGurutoday at 3:47 AM

That argument isn’t valid. The argument would be “this string design enabled a whole lot of useful software” but that’s a different matter. (And it could very well be the case.)

zzrrttoday at 6:26 AM

Lead was the basis for an awful lot of useful gasoline. Doesn't mean it was the only solution or the best one.

JdeBPtoday at 6:47 AM

A more accurate re-phrased version of the original is that they are the biggest mistake in the C language.

* https://news.ycombinator.com/item?id=48614913

* https://news.ycombinator.com/item?id=24454369

* https://news.ycombinator.com/item?id=1014533