Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-01-21 19:30:26


"Daniel Wallin" <dalwan01_at_[hidden]> wrote in message
news:400F1267.8090002_at_student.umu.se...
> Jonathan Turkanis wrote:
>

> > First, I'm just proposing the policy parameter so we will have a
> > number of options to choose from. Right now, there isn't any
client
> > code to break.
>
> Yes I am aware of that, and what I'm saying is that we should be
> careful about complicating things too much.
>
> > Second, it shouldn't break any code, if people agree with you and
> > don't want custom deleters:
> >
> > template< typename T,
> > template<typename> class Deletion = no_storage
>
> > class move_ptr;
> >
> > (I've made the policy into a template template parameter, for
> > convenience.)
>
> You almost certainly don't want this. If you need to generate the
> deleter type somehow, make it a metafunction class.

I stay away from template template parameters most of the time, for
the sake of old compilers. But here we're relying heavily on SFINAE,
so I don't see the need. In one of my earlier posts the policies were
(implicitly) metafunction classes, but when I actually sat down to
write them it seemed to make the code needlessly obscure. I'm trying
to be careful not to complicate things too much ;-). Its no big deal
to switch later.

>
> > People who agree with you will just use plain move_ptr<T>, so
their
> > code won't be affected. People who like and use custom deleters
will
> > argue against the removal of the policy parameter.
>
> Again, the point is that if we were to get to a point where people
use
> custom deleters it's (almost) too late to remove them, regardless of
how
> bad a design choice they turn out to be.
>

I think it's reasonable to create a prototype so people can see an
example of what they're arguing about. My goal is to have the
implementation done tonight. That means it will be done next week. :-)
People can play with it a bit -- if they're interested -- and let me
know what they think. Maybe by next Tuesday there will be a consensus
to scrap the deleters.

I think it's a little early in the game to be worrying that it will
soon be 'too late' to remove features.

Jonathan


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