Boost logo

Boost :

Subject: Re: [boost] [Concepts] Definition. Was [GSoC] [Boost.Hana] Formal review request
From: Roland Bock (rbock_at_[hidden])
Date: 2014-08-05 12:34:34


Hi Robert,

Focussing on the term "concept" below. I'll comment on some of the other
parts later.

On 2014-08-05 17:29, Robert Ramey wrote:
> I believe that "C++ Concept" was originally defined by the following web page
> or writing contemporary to it.
> https://www.sgi.com/tech/stl/stl_introduction.html . A relevent quote is
>
> "One very important question to ask about any template function, not just
> about STL algorithms, is what the set of types is that may correctly be
> substituted for the formal template parameters. Clearly, for example, int*
> or double* may be substituted for find's formal template parameter
> InputIterator. "
Thanks for providing this link!

Citing from it: "we call such a set of type requirements a /concept.
[...] //We say that a type /conforms to a concept/, or that it /is a
model of a concept/, if it satisfies all of those requirements"/.

>
> I don't think we want to alter this definition. It's not formal (in the
> mathematical sense), but it's not ambiguous in our context.
>
> My complaint isn't the definition - it's the phrase/word that was chosen to
> embody the idea. The word chosen was "Concepts" which, in my view has led
> to all sorts of confusion to the casual reader - as most of are when we read
> documentation. So my view is that we would be better served by using the
> term "type requirements" and/or "type constraints" rather than the word
> "Concepts". That's all. Of course people can and will continue to use the
> word "Concept" in the way they have been. But that doesn't prohibit me from
> using the phrase "type constraint" from referring to the original idea.
Calling it "type requirements" would be fully backed by the SGI document.

[...]
> But with C++11 it's much more interesting. I just came upon:
>
> http://en.cppreference.com/w/cpp/concept
First sentence: "A concept is a term that describes a *named set of
requirements* for a type"

>
> which echoes my views on the whole subject. I don't have the C++11 spec -
> but I'm assuming/hoping that these type requirements are part of it. This
> section only defines the named type requirements.
>
>

Cheers,

Roland


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