|
Boost : |
Subject: Re: [boost] Should Boost adopt pimpl/d-pointer as much as it can?
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2010-03-21 02:15:12
On Sat, Mar 20, 2010 at 7:01 PM, Steven Watanabe <watanabesj_at_[hidden]> wrote:
> AMDG
>
> Artyom wrote:
>>
>> There are recently lots of discussions about current development issues.
>>
>> I would like to point to one small but extremely important issue (from
>> user point of view).
>>
>> Boost has too many logic in header part of library, by meaning too much
>> I mean painfully too much.
>>
>> I think that Boost should adopt as policy:
>>
>> 1) All implementation related code **should** be put in sources.
>> 2) Any non-template based class should have opaque/d/pimpl pointer in its
>> body.
>
> I am against such a policy. Such decisions should be left
> to the library author and the review process.
In principle you're right, however most, even brilliant programmers,
don't think that physical coupling is a big problem. That's the real
problem, and it can only be addressed by a global requirement.
But that's pointless in the case of Boost. First, most people will
disagree with such a policy; we'll have endless arguments whether a
"simple" function should be inline (it shouldn't if that's at all
possible). Second, once physical coupling has you, it's extremely
difficult to remove (the opposite -- introducing coupling to buy
performance -- is always trivial.)
Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk