top | item 46814960

(no title)

feelamee | 1 month ago

why use modules if PCH on your diagram is not much worse in compile times?

discuss

order

nickelpro|1 month ago

Macro hygiene, static initialization ordering, control over symbol export (no more detail namespaces), slightly higher ceiling for compile-time and optimization performance.

If these aren't compelling, there's no real reason.

feelamee|22 days ago

We live with that for *decades*. For me this is not a daily problem. So yes, this is not compelling, unfortunately.

WalterBright|1 month ago

Having implemented PCH for C and C++, it is an uuugly hack, which is why D has modules instead.

bluGill|1 month ago

modules are the future and the rules for are well thought out. Ever compiler has their own version of PCH and they all work different in annoying ways.

Maxatar|1 month ago

Modules are the future... and will always be the future.

feelamee|22 days ago

> Ever compiler has their own version of PCH and they all work different in annoying ways.

I don't care because I use cmake