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

That’s only for external identifiers (the one the linker sees), and it’s only six characters. This limit comes from FORTRAN, and in turn comes from the world of 36-bit word mainframes. Those machines didn’t have bytes, only words. Words could represent numbers, or up to 6 characters (in a 6-bit character set, no lowercase letters).

Internal identifiers and macro names had a lower limit of 31 significant characters in C.

The more relevant original reason for short identifiers is that code completion wasn’t a thing, and to a lesser extent that screens were at most 80 characters wide.



The limit for syscalls in early Unix seems to be five though. I forget why.

Hence, famously, "creat" instead of "create"




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

Search: