Boost logo

Boost :

From: Doug Gregor (dgregor_at_[hidden])
Date: 2006-04-10 13:29:53

On Apr 10, 2006, at 11:50 AM, Robert Ramey wrote:
> On the other hand - I don't see the motivation for including concepts
> in the core language. Haven't we been able to implement concept
> checking with the current facilities of the library? It seems to
> me that
> the main problem these days with the C++ language these days is that
> its too hard to write a correct compiler for it. Making the core
> language fancier will only make this problem worse.

Imagine a world where the compiler type-checks your templates when
you define them, so that no type errors slip past until instantiation
time. A world where misuse of template libraries results in 2-line
error message instead of a 2-megabyte error message, where user
errors are diagnosed as user errors and implementor errors are
diagnosed as implementor errors. Imagine throwing away all of that
imprecise concept documentation we use, replacing it with precise
concept definitions checked by the compiler. Imagine composing
generic libraries together without writing a single adaptor class,
where it doesn't matter if I call it "x.size()", "size(x)", or "length
(x)". And do it all without breaking existing code.

Concepts will drastically improve our ability to write solid generic
libraries in C++. When we've improved our compiler and introductory
material, we'll announce the next release of ConceptGCC. I strongly
encourage everyone interested in library design to give it a try.


Boost list run by bdawes at, gregod at, cpdaniel at, john at