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

It's not just stupid, it breaks the language. Things will be valid when compiled together that are invalid C++ when compiled separately. Your #includes will become more and more wrong over time, and if you ever change the grouping of files all kinds of random unrelated stuff will break.

It's also a really great idea, for the reasons you give. This is how the Firefox tree is built, and it gives massive compile and link time speedups. (We call it "unified builds".)

Some runtime speedups too. I guess that's from better cross-file inlining?



WebKit does it too, and there’s a certain style you need to write your code in for it to work. (Generally, namespace everything.)




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

Search: