Pimpl-ization
Stephan Bergmann
sbergman at redhat.com
Thu Dec 11 01:05:42 PST 2014
On 12/11/2014 03:09 AM, Kohei Yoshida wrote:
> Please share your opinions.
I think, as always, the pros and cons have to be weighed.
The benefit is decoupling. It apparently has a positive impact on the
size of debug information put into link objects by today's toolchains.
(And I would be surprised if it had an impact on any non-debug parts of
link objects.) Another positive impact is improved build time with
today's toolchains (sans pch). (But remember that pimpl-ization will
always need to include <memory> into the include file, so don't go
overboard with erasing standard library includes from include files.)
Disadvantages that come to mind are increased usage of dynamic memory
(which can impact both space and time), and, to some extend at least,
increased complexity of the code "in the small" (although complexity "in
the large" is probably reduced by the decoupling).
More information about the LibreOffice
mailing list