|
Boost : |
Subject: Re: [boost] [pimpl] Mini Review
From: Vladimir Batov (vb.mail.247_at_[hidden])
Date: 2011-05-26 18:14:39
> Artyom Beilis <artyomtnk <at> yahoo.com> writes:
> ...
Well, these reviews are clearly "fun". Is it that I am getting old and touchy or
these new kids on the block are getting vicious or they are learning C++ before
they learn "please", "thank you" and "with all due respect"?
Artyom, if you want to have a civilized conversation/discussion or at the very
least to maintain any *pretense* of a civilized conversation/discussion, then
you probably might like to have the other party *willing* to talk to you. If so,
then *please* try to refrain from statements like "without a knowledge of the
problem domain", "you need", "you want" and similar kind. I suspect quite a few
people might find such style as rude, objectionable and arrogant.
As it is now apart from this short email I suspect I won't be replying to your
"comments" related to the Pimpl library.
> Boost pimpl does not save anything in terms of boilerplate code.
Well, that's most certainly complete and utter bullshit (is it the language our
new developers speak/understand these days?)
> What is the difference between:
... I snipped the actual manually-crafted and Pimpl-based code.
The difference is that the Pimpl-based version provides the following
functionality which your "flexible" alternative does not.
relational operators;
safebool operator;
pimpl::null (and pule-eee-ase do not tell me that *I* do not need that);
support for in-place and replace boost::serialization;
support for value and pointer semantics (and others if needed policies);
support for the Bridge pattern;
support for Non-Virtual Interface Idiom;
the proper deployment of the incomplete-type management technique (for the
destructors to always work correctly).
I do agree that that's "not too much" as you put it. After all it's just one
tiny header file. However, you seem to like implementing (or rather ignoring)
that functionality for every pimpl you write. I seem to favor finding a solution
for a particular problem (even if that problem is as small as a pimple ;-) ) and
then *re-use* that solution. As I wrote in the original article which you
obviously did not bother reading -- "Writing a conventional Pimpl-based class is
not hard. However, repeating the same scaffolding over and over again is tedious
and error-prone. Why do that if we do not have to?"
Have a nice day.
Vladimir Batov.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk