Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Tim Bray on Dennis Ritchie (tbray.org)
237 points by DanielRibeiro on Oct 13, 2011 | hide | past | favorite | 9 comments


To be fair, agreement is not universal that null-byte termination is a good thing. Though that doesn't detract a thing from the man's greatness.


C strings have certainly proved more useful than contemporary attempts like Pascal strings. Those used an integer prefix to store the length of the string, but because any language at the time was expected to provide reasonable performance on prevalent 8-bit machines, the Pascal string length field was only 8 bits. Hence strings were limited to 255 characters.

The null terminator is actually an elegant machine-independent solution to this problem.


The NUL terminator is an extraordinary hack, in the best sense of that word, but it is not elegant. Strings that have to be expensively interrogated to discover their length have cost the industry billions and billions of dollars due to the inevitable software faults they cause.


Yes, I would say it is the single worst idea to come out of C.


I suspect that null-terminated byte strings are important in some non-trivial, non-obvious way.


I would almost say there is not one piece of modern computing today that is not touched by something Dennis Ritchie did.


Of course we all stand on Mr. Ritchie's shoulders, and it's really just a footnote to all this, but it's my understanding is that Brian Kernighan contributed "hello, world" to 'The C Programming Language' book.


When did we agree asciiz was a good string format? I didn't agree to that!


Another nitpick:

> Creating processes by duplicating existing processes.

Most systems have moved away from that toward posix_spawn.

Still!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: