Hacker News new | ask | show | jobs
by kbwt 3354 days ago
> Compile times aren't that slow

I beg to differ. C++ encourages placing more code than strictly necessary into header files. Even the standard headers such as <algorithm> add considerably to the compile time, and they keep getting larger with every revision of the standard. When you are making incremental changes, it accumulates to a lot of time spent waiting.

1 comments

use precompiled headers?
Precompiled headers never worked well due to a variety of limitations.

C++ modules, on the other hand, will be like precompiled headers done right. If they ever get standardized. They didn't make it into C++17, and the prototype implementations in Clang and MSVC are incompatible with each other, but I guess it'll happen someday…

> Precompiled headers never worked well due to a variety of limitations.

We use precompiled headers on a large project, we've never had any issue with them (MSVC and GCC)> Care to elaborate on the limitations?

>Precompiled headers never worked well due to a variety of limitations.

want to elaborate? i use MSVC's implementation and never encounter any problems with it. then again, i also don't work on large projects, so i would like some insight.