Boost logo

Boost :

Subject: Re: [boost] Should Boost adopt pimpl/d-pointer as much as it can?
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2010-03-21 04:59:37

On 03/21/2010 08:09 AM, Artyom wrote:
>>> I created a simple example of echo server written with
>>> Boost.Asio and written with a small pimpl-wrapped
>>> Boost.Asio
>> <snip>
>> It's fairly easy to convert
>> a non-pimpl interface into a pimpl one, espcially if you
>> need only a subset of it;
> You are wrong. I would even say, you are absolutely wrong. Have you ever
> tried to "pimplize" Boost.Asio even with small subset?
> I'm thinking about this more then a year. I'm active used of Asio in
> production environment and I still had to learn **a lot** about structure
> of Asio and implement few dozen pimpl interfaces in various libraries in
> order to write **any** kind of wrapper for Asio.
> So do not expect from average Boost user to wrap Asio or even simpler
> libraries.

I think pimpl should be used on by case basis, because it doesn't make
sense in every library Boost has. In the particular case of ASIO, it may
be reasonable to provide such interface _in_addition_ to the current
header-only, if it is possible to create one without sacrificing genericity.

Boost list run by bdawes at, gregod at, cpdaniel at, john at