C++ Logo

SG20

Advanced search

Subject: Re: [isocpp-ext] [isocpp-lib-ext] P1754R0: Rename concepts to standard_case for C++20, while we still can
From: Tony V E (tvaneerd_at_[hidden])
Date: 2019-06-19 12:56:41


On Wed, Jun 19, 2019 at 8:58 AM Bjarne Stroustrup <bjarne_at_[hidden]>
wrote:

>
> But, can somebody elaborate on the following, please :
> AFAIK, we get the ability to use auto as function parameters:
> foo(auto x)
> Do we also allow to use concepts here:
> foo(myconcept x)
> If not I bet we will get it later.
>
> HERE I really would like to be able to see that a standard concept is used
> So
> foo(myconcept x)
> and
> foo (string x)
> should be able to be seen different.
>
> Why?
>
> I think that's a mistake. I used to subscribed to it and experimented with
> quite a few ways of distinguishing concepts, but found that they didn't
> seem to do anything useful. They were just uglier and more distracting than
> type names. Then I experimented with students *not* using distinguishing
> naming styles and found no problems. None. I'm reporting on a couple of
> years' thinking and experimentation here.
>

And don't forget CTAD.

std::vector<int> x = f();
std:: vector y = f();
std:: Container auto z = f();
or
std:: container z = f(); // some day?

The lines between type/template/concept are blurring, and - other than && -
it isn't a big problem.

-- 
Be seeing you,
Tony


SG20 list run by herb.sutter at gmail.com

Older Archives on Google Groups