Boost logo

Boost :

Subject: Re: [boost] [contract] concepts: pseudo-signatures vs. usage patterns
From: Doug Gregor (doug.gregor_at_[hidden])
Date: 2012-10-12 15:05:10


On Fri, Oct 12, 2012 at 6:25 AM, Andrew Sutton <asutton.list_at_[hidden]> wrote:
>> 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.
>
> Experimenting is great. This is why I have Origin
> (https://code.google.com/p/origin/). I've been experimenting with
> concepts-as-a-library in various forms since 2009, and it only gets
> you so far. It's a very helpful if you want to develop a first pass at
> concepts for a library, and sometimes it pays off if you need to
> reason about some language feature interactions.

This is an extremely important point: emulating the concepts language
feature with a library has its limits. Most of the hard problems with
concepts, including the hard problems of making those concepts that we
right actually model what we want---involve the type checking of
template definitions. That type checking can be simulated with
archetypes, but it's very hard to write archetypes that are as picky
as what a compiler would come up with. That means that the concepts we
write can't actually be validated against implementations, so it's
hard to have any confidence in those concepts.

>From the standardization perspective, we'll make zero progress until
someone gets working on a real implementation. Just having a concept
parser + archetype generator (which then instantiates template
definitions based on those archetypes) would be a huge win.

  - Doug


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