Remix.run Logo
feelamee 5 hours ago

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

nickelpro 5 hours ago | parent | next [-]

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.

WalterBright 4 hours ago | parent | prev | next [-]

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

bluGill 5 hours ago | parent | prev [-]

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 2 hours ago | parent [-]

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