Boost logo

Boost :

Subject: Re: [boost] [pre-review] Pimpl submission in the review queue
From: Sean Chittenden (sean_at_[hidden])
Date: 2011-05-24 15:54:16


> I have a Pimpl generalization submission getting close to the top in the review
> queue. Rob Stewart suggested I'd post it to the new Boost Code Collaborator site
> for a pre-review. That's what I did with the following link to the pre-review
> (Review #5):
>
> http://demo.smartbear.com/boost/go?page=ReviewDisplay&reviewid=5
>
> Your participation in that pre-review is most welcome.

Fantastic! I signed up and am anxious to see this library accepte^Wreviewed^Waccepted. I've been using the Boost.Pimpl interface for nearly a year now and have been very successful and happy with its use in my projects. Second to ASIO, Boost.Pimpl has done more to impact the design, structure and maintenance of my projects than any other library (the benefits of a stable ABI are understated). Its use in maintaining clean interfaces and projects can't be understated. Historically I'd always saved implementing Pimpl for external facing bits and had always rolled my own interface, now I use it for everything internal or external because of how easy it is to thump out a Boost.Pimpl based interface.

As I said on the review site, I've moved the Pimpl implementation in to "boost/pimpl" directory with success, though was not able to move the Pimpl library under the boost namespace.

Actually... let me post a quick example that I wrote to both learn and quickly teach how to use Pimpl:

        https://github.com/sean-/Boost.Examples/tree/master/pimpl

It takes about 60sec-3min for most people to have their "ah ha!" moment with that example (those unfamiliar with Pimpl would be wise to check it out, imnsho).

I didn't dive in to the why, but in the implementation it is necessary open your namespace after you have defined your private implementation (see pimpl/pimpl_example_pointer_impl.cc:35). It would be nice to know why this is the case (or if it's a bug).

Pre-review feedback: The examples used in the Pimpl unit tests are very very good, but it takes a few minutes to wade through the polymorphism and to tease out the most basic requirements for starting to use Pimpl. Walking through 1K of code to do something very simple is a bit daunting despite the obvious and nearly immediate dividends. Whenever I started using this, it was one of the best few hours I've ever spent learning something new.

I'm very pleased to see this library move forward and look forward to its formal review. -sc

--
Sean Chittenden
sean_at_[hidden]

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