Hacker News new | past | comments | ask | show | jobs | submit login

Early header compression.



Took a leaf out of the UNIX creat/umount handbook, clearly.


umount() is actually legit - early C limited extern identifiers to 6 chars (or rather it would allow more than that, but the rest would be silently ignored for linking purposes), hence why we also have strlen() etc.

creat() is weird because create() would fit that constraint just fine, so there's no obvious reason as to why it had to be shortened. The 1978 K&R C book actually notes it with [sic].


When you're dumping loads of short, generic, common words into the global namespace (well ... the only namespace in C), it's nice to have them misspelled so user code is still free to use the real word.


> well ... the only namespace in C

Technically there are several namespaces since you can, for example, name a struct the name as its type.


After many years in Javaworld, seeing this sort of thing in C++ really freaked me out.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: