Boost logo

Boost :

From: John Maddock (jz.maddock_at_[hidden])
Date: 2022-04-05 16:56:06


> To be specific here, what are the gains of Modules over Precompiled
> Headers, which Boost.Build already supports?

Well they're all shiny and new of course ;)

But ease of use might be one - no need to set up PCH's, just use import
declarations and be done with it.

Aside: for those of us of an age to remember Turbo C++, the PCH support
was IMO better thought out and so stupidly fast compared to the
competition of the time it was almost laughable.  It probably offered a
good percentage of the improvements offered by modules too, though
whether it would ever have scaled to today's coding paradigms and the
latest C++ features is another matter.

John.

> Niall's fairly confident answer: little to none, and perhaps even a
> regression as ODR resolution is time expensive.
>
>
> A better question is whether the compartmentalisation and isolation
> features of Modules are worth adopting Modules?
>
> Niall's fairly confident answer: it *may* be worth it for new codebases,
> but it's very unlikely to be worth retrofitting an existing codebase. An
> awful lot of work for little gain, in my opinion, for most existing
> codebases.
>
> tl;dr; just turn on precompiled headers.
>
> Niall
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk