From: David B. Held (dheld_at_[hidden])
Date: 2002-04-28 20:22:19


"Phil Nash" <phil.nash.lists_at_[hidden]> wrote in message
news:000701c1ef10$5a07f270$239487d9_at_TimeMachine...
> [...]
> Hi Dave (and co), sorry to come to this late - hope you're still reading
the
> thread :-)

You bet. I'm working on smart_ptr when I have time and motivation. ;)
And I'm learning as I go, so that slows me down a bit as well.

> Could the decision as to whether we use a linear inheritance hierarchy
> or MI be deferred to yet another policy? (YAP?).

Heh, heh. Sure it could. But I think that would defeat the purpose of
using
MI in the first place. I myself am not intimidated by specifying five or
six
policies for a type, since I usually just do it once or twice, and use a
typedef
everywhere else. In fact, I consider the full type spelled out, policies
and
all, as an in-code documentation of what I'm doing.

> By inheriting smart_ptr immediately from, say, policy_mixer (for want of
> a better thought out name), we leave it to policy mixer how to, well, mix
> the policies. [...]

I think if you're going to defer the policies to a mixer, you may as well go
the full policy chaining route, IMO. I think the MI approach allows a
concise
statement of the policies chosen (and I think it's an elegant design, to
boot).
Once you throw in a policy mixer, you're abandoning the implementation
elegance of the MI approach, and have the verbosity of the chained policy
approach, so why not just go with that?

Dave