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

That's partly an exception that proves the rule and partly not a typical case. Uniquely, OSs get to reserve names for themselves (like time, syscall, reboot, etc.). Third-party libraries and other code have to do funny prefixing to avoid name collisions. OSs also have relatively few source code dependencies and, when they do, they get to dictate them.

There are other reasons that C doesn't scale well to large software systems. For example, C's relatively limited compile-time error checking, which leads to using conventions (especially naming conventions) to enforce good practices where tools and good typing would do the job better.




Exceptions don't prove rules; they refute them.

The actual origin of the saying is quite different:

http://en.wikipedia.org/wiki/Exception_that_proves_the_rule


I understand what the expression means, and that's what I meant (though perhaps I could have been more clear). *nix (and libc) are exceptional in that they got first dibs on the symbols they wanted due to being there first. So it proves (while justifying) the rule that you have to prefix all of your symbols unless you're Thompson or Ritchie in the 70s. Even now, in newer C features, extra acrobatics are done to avoid name collisions (_Bool in C99 for example).

But this is really a side issue to my original point: C++ and PHP are categorically different since there aren't strong alternatives to C++ for many types of problems. Though it is possible that other languages are eating at the edges of what C++ is good at.


You don't need to write large software systems in C or C++. Use Java. Or decompose it into components and employ Python.

But GC, VM, OS - all those TLAs can and should be written in kosher C.




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

Search: