Boost logo

Boost :

Subject: Re: [boost] [C++0x] Report from Frankfurt committee meeting
From: Andrew Sutton (andrew.n.sutton_at_[hidden])
Date: 2009-08-12 20:58:21


> I'm curious about the concept of concepts. I looked into the current
> library and it looked interesting but the syntax seemed sort of opaque - at
> least to my in experienced eye. I searched in boost for libraries which
> use
> the concept library. I didn't find any. This was a surprise to given the
> benefits that are anticipated from it. I guessed that the C++ template
> metaprogram implemenation was lacking in some way. I don't know what way,
> but I didn't want to be the first to add it to a boost library.
>
> I've had a lot of reservations about adding anything to a standard which
> hasn't had wide usage. It's just to hard to get anything complicated right
> the first time. I proposed the idea of writing a "lint-like" program in
> order to:
>

I think that you have nicely summarized the single largest problem here -
very few people have any experience developing with concepts - as you've
found surveying the Boost libraries. By the way, the BGL uses concepts
extensively.

Beyond that, writing and using concepts is /hard/. Concepts are pure design.
You're trying to describe broad classes of types, but not necessarily
writing something functional. Get it wrong, and you exclude valid
abstractions, or admit those that don't work. Try it: what's a "list"? Maybe
part of the issue is that we're being given a solution without really
understanding the problems.

To be fair, I would claim that you /did/ find concepts and concept-related
techniques being used, but you would probably see them as tag dispatch,
traits classes, type traits, SFINAE techniques, etc.

Andrew Sutton
andrew.n.sutton_at_[hidden]


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