From: Christopher Currie (codemonkey_at_[hidden])
Date: 2004-07-19 16:03:15
Matt Hurd wrote:
> On Fri, 16 Jul 2004 23:38:43 -0400, Michael Glassford
> <glassfordm_at_[hidden]> wrote:
>>This occurred to me during this massive threading thread. It seems that
>>no two people agree on what a threading library should look like (e.g.
>>some people want one mutex class and one lock class; others want three
>>mutex classes and three lock classes with no overlap; others want three
>>of each, with each being a superset of the last; others like things the
>>way they are now; etc.). I thought perhaps that well designed
>>policy-based classes could give most people what they want without
>>making everyone else have it too.
> Yes, I think it is going to be the only way to provide basic locking
> functionality that is not easily abused and the full low level access
> that others strive for.
> There are a bunch of clever people with strong views on needing
> different things and a policy based approach maybe the only way to
> deliver this. Basic typedefs for scoped locks and the standard
> mutexes will do a 95% job I'd think.
The only thing I fear (and this is just me being paranoid) is that if we
put out too many different interfaces to the same functionality, it will
make it that much harder for new users to learn, and that much easier to
I recognize that developers are going to use the interface that's
easiest for them to write. Even if there's an (argueably) safer way to
use it, it's not going to happen if the interface provides shortcuts.
So, despite the fact that my strong views favor safety over convenience,
I feel that I'd rather concede the point and see a clean, minimal
interface than have a complex interface to support every usage paradigm,
particularly if it's only going to support special interests like my own.
-- Christopher Currie <codemonkey_at_[hidden]>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk