On Thursday, 23 August 2018 at 07:37:07 UTC, Iain Buclaw wrote:
Possible Solution: Make all globals hidden by default unless 'export'.

Same mess as in C++. But there you have -fvisibility=hidden at least to fix it.

Side effects: Everyone will be spending weeks to months fixing their libraries in order to only mark what should be visible outside the current compilation unit as 'export'.

Shouldn't it be sufficient to put an export: at the top of each module to roll back to the old behavior and do the real fix later?

Benefits: Faster compile times, as in, in the most extreme example I've built one project on github with gdc -O2 and build time went from 120 seconds to just 3!

So why not add such an opt-in flag to all compilers, deprecate the old behavior and do the switch at some point.

Reply via email to