Boost logo

Boost :

Subject: Re: [boost] [contract] concepts: pseudo-signatures vs. usage patterns
From: Lorenzo Caminiti (lorcaminiti_at_[hidden])
Date: 2012-10-11 21:51:13


On Thu, Oct 11, 2012 at 6:01 PM, Andrew Sutton <asutton.list_at_[hidden]> wrote:
>> Can we write down pros and cons for concepts implemented via
>> pseudo-signatures (C++0x-like and Boost.Generic) vs. usage patterns
>> (N3351 and Boost.Contract)?
>
> I think it would be more productive to start writing concepts in
> whatever system seems appropriate.

Hasn't this already been done for the STL (algorithms) by both N2914
and N3351? If we can't settle on a couple of approaches to experiment
with and list their advantages/disadvantages, how can we hope to ever
get concepts standardized?

Right now I see two ways forward:

1. I implement N3351 in Boost.Contract and Matt implements N2914 in
Boost.Generic.
2. Or, I help Matt implementing N2914 in Boost.Generic (and
Boost.Contract's requires clause will use concepts defined using
Boost.Generic).

Then we all use the lib(s) to experiment with concepts before
(re)proposing concepts (and hopefully contracts) for standardization
in C++1x.

> Pick a library; write the concepts
> and their requirements in a way that feels natural to you. Don't
> forget the semantics. Figure out what you need to say, and try to find
> the most effective and least verbose way to say it. Try writing it
> another way.
>
> Maybe you'll end up with different ideas that either use-patterns or
> pseudo-signatures.
>
> It's more important to know the range of things that need to be said
> than how to say them.

Thanks,
--Lorenzo


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