Topic: concept syntax question
Author: gmisocpp@gmail.com
Date: Sat, 1 Jul 2017 00:53:57 -0700 (PDT)
Raw View
------=_Part_793_1140564750.1498895637469
Content-Type: multipart/alternative;
boundary="----=_Part_794_754387085.1498895637469"
------=_Part_794_754387085.1498895637469
Content-Type: text/plain; charset="UTF-8"
Proposal P0716R0 suggests this concept syntax:
template < template-parameter-list > concept identifier =
constraint-expression ;
I would prefer this:
concept < template-parameter-list > identifier : constraint-expression ;
Because:
* It's immediately clear we are defining a concept and not some other
template thing.
* Knowing it's a concept upfront might aid parsing of subsequent tokens
later if the syntax is expanded.
* It's shorter because won't require both concept and template keywords as
both seems redundant.
* It looks less like a variable template.
* Removing the = makes it look less like some thing being initialized.
What do you think?
Thanks
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/d129d7e7-e96f-464c-b5ef-9d16e72ae6ca%40isocpp.org.
------=_Part_794_754387085.1498895637469
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>Proposal P0716R0 suggests this concept syntax:</div><=
div><br></div><div>template < template-parameter-list > concept ident=
ifier =3D constraint-expression ;</div><div><br></div><div>I would prefer t=
his:</div><div><br></div><div><div><div>concept < template-parameter-lis=
t >=C2=A0identifier=C2=A0: constraint-expression ;</div><div><br></div><=
div>Because:</div></div></div><div><br></div><div>* It's immediately cl=
ear we are defining a concept and not some other template thing.</div><div>=
* Knowing it's a concept upfront might aid parsing of subsequent tokens=
later if the syntax is expanded.</div><div>* It's shorter because won&=
#39;t require both=C2=A0concept and template keywords as both seems redunda=
nt.</div><div><div>* It looks less like a variable template.</div><div>*=C2=
=A0Removing the =3D makes it look less like some thing being initialized.</=
div><div><br></div></div><div><div><div>What do=C2=A0you think?</div><div><=
br></div><div>Thanks</div></div></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/d129d7e7-e96f-464c-b5ef-9d16e72ae6ca%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/d129d7e7-e96f-464c-b5ef-9d16e72ae6ca=
%40isocpp.org</a>.<br />
------=_Part_794_754387085.1498895637469--
------=_Part_793_1140564750.1498895637469--
.
Author: =?UTF-8?Q?Klaim_=2D_Jo=C3=ABl_Lamotte?= <mjklaim@gmail.com>
Date: Sat, 1 Jul 2017 15:32:43 +0200
Raw View
--f40304379b8895a84105534191a0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
On 1 July 2017 at 09:53, <gmisocpp@gmail.com> wrote:
> Proposal P0716R0 suggests this concept syntax:
>
> template < template-parameter-list > concept identifier =3D
> constraint-expression ;
>
> I would prefer this:
>
> concept < template-parameter-list > identifier : constraint-expression ;
>
> Because:
>
> * It's immediately clear we are defining a concept and not some other
> template thing.
> * Knowing it's a concept upfront might aid parsing of subsequent tokens
> later if the syntax is expanded.
> * It's shorter because won't require both concept and template keywords a=
s
> both seems redundant.
> * It looks less like a variable template.
> * Removing the =3D makes it look less like some thing being initialized.
>
> What do you think?
>
Interesting. You might want to post your suggestion there:
https://groups.google.com/a/isocpp.org/forum/?fromgroups#!forum/concepts
Or write an actual paper.
A. Jo=C3=ABl Lamotte
--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/CAOU91OMcQ_%3DmapV0GwmFhKMNs0reS%3D2-W%2B7tpdLxi=
jGjfkbvWQ%40mail.gmail.com.
--f40304379b8895a84105534191a0
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">=
On 1 July 2017 at 09:53, <span dir=3D"ltr"><<a href=3D"mailto:gmisocpp@=
gmail.com" target=3D"_blank">gmisocpp@gmail.com</a>></span> wrote:<br><b=
lockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-le=
ft:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div>Propo=
sal P0716R0 suggests this concept syntax:</div><div><br></div><div>template=
< template-parameter-list > concept identifier =3D constraint-expres=
sion ;</div><div><br></div><div>I would prefer this:</div><div><br></div><d=
iv><div><div>concept < template-parameter-list >=C2=A0identifier=C2=
=A0: constraint-expression ;</div><div><br></div><div>Because:</div></div><=
/div><div><br></div><div>* It's immediately clear we are defining a con=
cept and not some other template thing.</div><div>* Knowing it's a conc=
ept upfront might aid parsing of subsequent tokens later if the syntax is e=
xpanded.</div><div>* It's shorter because won't require both=C2=A0c=
oncept and template keywords as both seems redundant.</div><div><div>* It l=
ooks less like a variable template.</div><div>*=C2=A0Removing the =3D makes=
it look less like some thing being initialized.</div><div><br></div></div>=
<div><div><div>What do=C2=A0you think?</div></div></div></div></blockquote>=
<div><br></div><div>Interesting. You might want to post your suggestion the=
re:=C2=A0<a href=3D"https://groups.google.com/a/isocpp.org/forum/?fromgroup=
s#!forum/concepts">https://groups.google.com/a/isocpp.org/forum/?fromgroups=
#!forum/concepts</a></div><div><br></div><div>Or write an actual paper.</di=
v><div><br></div><div>A. Jo=C3=ABl Lamotte</div><div><br></div></div></div>=
</div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAOU91OMcQ_%3DmapV0GwmFhKMNs0reS%3D2-=
W%2B7tpdLxijGjfkbvWQ%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfoote=
r">https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAOU91OMcQ_=
%3DmapV0GwmFhKMNs0reS%3D2-W%2B7tpdLxijGjfkbvWQ%40mail.gmail.com</a>.<br />
--f40304379b8895a84105534191a0--
.