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

The point is that those separate processes are doing a whole lot of duplicate work that the linker must then deduplicate. There are definite pros and cons to each approach, but it is not as clear as "just use more cores" when it also means "duplicate a lot of work, that you'll have to clean up mostly serially".

I think devs working on large systems in soft-realtime domains are the ones to look at. There you'll often find build systems that are mostly unity builds, but that allow ad-hoc source files to be separately compiled, often with separate compilation options (such as with debug symbols and optimizations, etc.) that are too onerous to enable globally.

As far as problems with constructs like anonymous namespaces and name clashes are concerned, I think they're relatively easily resolved for new code, and these techniques are quite old. Many have been using this "new" approach for decades, so the "legacy" code is also clean in this regard.

But it's unfortunate that the net result is that anonymous namespaces are effectively useless. However, that's just case number 99 for "stuff added to the standard that you can't really use because of 5 or so other major problems with the language". And most new languages don't improve on any of this stuff, they just buy you off with other novel features -- admittedly sometimes quite intriguing ones.



The separate processes are only doing duplicate work if you put a lot of code into header files. In C this isn't a problem - you can put code into source files easily. In C++, the design of templates necessitates putting all your code in header files.

Most "modern" languages are designed around building the whole world and statically linking it into your program. As you say, they don't improve on any of this stuff.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: