News for hackers. Stuff that matters.
Re:The C++ Build Process Explained by roel_v on Thursday November 15, 2018 @03:48AM (#18457812)
"Precompiled headers are/were are thing, but they're very brittle."

In compilers other than Visual Studio, yes (or so I'm mostly told - I don't have all that much experience with them), but msvc has had them since at least VS6 (late 1990's) when I first started using them, and they work very well and have saved me many, many hours since then. Maybe once or twice I had to delete the pch file in all that time, and that was most likely more of a issue of the GUI mangling the saved internal state than the actual compiler.

I've heard pushback against precompiled headers from Unix land for 2 decades, I'm not really sure where it comes from. I have the impression it's mostly cognitive dissonance - 'msvc has it and gcc doesn't, therefore it must be bad because gcc is 'better' than msvc'. It's similar to #pragma once - in use, it's objectively better in every possible way than include guards are, and gcc fanboys still dismissed it back when gcc didn't have them.

Re:The C++ Build Process Explained by gpderetta on Thursday November 15, 2018 @09:20AM (#18459372)
FWIW, gcc has had pragma once for ages. On the other hand recently we had issues with MSVC not recognizing that an header and its simlink were the same. GCC and clang had no problems.

There is a reason pragma once is not standardized. Defining when to include lines refer to the same file is extremely hard.

Re:The C++ Build Process Explained by jcelerier on Thursday November 15, 2018 @05:43AM (#18458293)
GCC had PCH for years though. Every semi-large project I do with GCC / Clang gets the PCH treatment, in particular because it's so simple with CMake.