|
Boost : |
From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2003-01-19 21:27:26
"Alisdair Meredith" <alisdair.meredith_at_[hidden]> wrote in message
news:3E2B4CB0.BD4BEE_at_uk.renaultf1.com...
> Yet I always find myself turning to either scoped_ptr (practically
> essential with the borland VCL), std::auto_ptr (for returning from
> factory-type functions) or shared_ptr (for just about everything else)
>
> The simplicity is simply too big a lure. Although we could tune and
> focus our pointers more effectively using policies and Loki, we then
> have the complexity of many pointer types running through our code, and
> having to remember the nuances of how each one was defined. Using the
> basic 3 mentioned above simply cuts out the clutter.
I agree with you that simplicity is great. In wake of your down-to-earth
arguments, I think maybe it would be better to cease thinking that
policy-based smart pointers are an appealing solution. Many designs I
myself have seen here and there are a turnoff because they fail to draw the
proverbial line in the sand and find that nice elegant balance between
simplicity and completeness.
Andrei
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk