|
Boost : |
From: David Abrahams (abrahams_at_[hidden])
Date: 2001-03-26 08:41:54
In the generative interfaces I have seen, the parameters name themselves.
Using named template parameters is overkill in this situation. What we want,
for ease-of-use, is simply an interface that allows the parameters to be
passed in any order. That is,
mutex_generator<checked, nonrecursive>::type
is self-documenting, but should be equivalent to
mutex_generator<nonrecursive, checked>::type
-Dave
> -----Original Message-----
> From: Lie-Quan Lee [mailto:llee1_at_[hidden]]
> Sent: Monday, March 26, 2001 8:35 AM
> To: boost_at_[hidden]
> Subject: Re: [boost] Comments on the thread library
>
>
> At Sun, 25 Mar 2001 13:30:44 -0500 (EST),
> jeremy siek wrote:
>
> > For example, the mutex class is currently not as efficient as possible
> > because it has to support a timed lock in addition to the usual
> lock (see
> > current discussion between Rich Lee and Bill). But who says we have to
> > group these two kinds of locking into the same class! We need to
> > orthogonalize the implementation and slap a generative interface on the
> > whole thing!
>
> Agree! What I want to do is to use a policy-based design to have a
> mutex generative interface so that users could a mutex with a
> combination of features (for example, checked and nonrecursive, or
> timed lock and unchecked) they want. In addtion, named template
> arguement technique could be applied in the mutex case to create more
> user friendly interface. To create such a mutex interface will be more
> than joyful. However, I have to do other timed work in next a couple
> of weeks. I will do that after I finished my timed work.
>
>
> Rich
>
> Cheers,
> --
> Lie-Quan Lee
>
> To unsubscribe, send email to: <mailto:boost-unsubscribe_at_[hidden]>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk