LWN.net Logo

C vs. C++ vs. ...

C vs. C++ vs. ...

Posted Jul 1, 2012 20:27 UTC (Sun) by Cyberax (✭ supporter ✭, #52523)
In reply to: C vs. C++ vs. ... by khim
Parent article: Why learn C? (O'Reilly Radar)

Again, having code split into small files is just a matter of taste. I prefer my files to be less than 1000-2000 LOCs (especially in plain C), so I can easily navigate them visually. It doesn't affect performance in any way.


(Log in to post comments)

C vs. C++ vs. ...

Posted Jul 1, 2012 22:36 UTC (Sun) by juliank (subscriber, #45896) [Link]

Of course it does, if you have many internal functions, you can declare them static, if they are in the same unit. If you split them over multiple files, the compiler cannot inline them and/or the program needs to look them up at run-time (unless you use ELF symbol visibility).

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds