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: Christopher Di Bella (cjdb.ns_at_[hidden])
Date: 2019-06-19 05:53:25


On Wed, 19 Jun 2019 at 11:35, Ville Voutilainen <ville.voutilainen_at_[hidden]>
wrote:

> On Wed, 19 Jun 2019 at 13:32, Nico Josuttis <nico_at_[hidden]> wrote:
> >
> > According to my experience the most common project rule is
> > - objects/values start lower case
> > - types start upper case
>
>
> > Here, std already is different, which we taught for years.
> > So the new rule would help me NOT to explain why std symbols now
> suddenly have camel case.
> > So I don't agree that this is harder to teach.
>

+1

> >
> > 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.
>
> Currently, you need to write
> whatever_return_type foo(myconcept auto x);
>
> > 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.
>
> They are, because the concept requires an auto.
>
> > For that reason I highly recommend a common prefix:
> > foo(c_myconcept x)
> > (or a suffix, but better a prefix):
> > foo(myconcept_concept x)
>
> Completely unnecessary.
>

+1, even if we can remove the auto in a future standard, IMO.

> _______________________________________________
> Ext mailing list
> Ext_at_[hidden]
> Subscription: http://lists.isocpp.org/mailman/listinfo.cgi/ext
> Link to this post: http://lists.isocpp.org/ext/2019/06/10303.php
>



SG20 list run by herb.sutter at gmail.com

Older Archives on Google Groups