Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Huh, you're right. I wonder when they changed that.


They didn't, it's there from at least ANSI C89 (ISO C90): "A byte with all bits set to 0, called the null character, shall exist in the basic execution character set; it is used to terminate a character string literal."


I think the rationale is in EBCDIC support; the C standard didn't want to/couldn't mandate ASCII, and therefore could not use the ASCII NUL character.

I honestly don't know whether POSIX/SUS mandates ASCII.



I read that as "ASCII must be supported, do whatever else you want". But I don't want to spend too much time on this...


NUL is in ASCII an abbreviation for null.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: