220 34727 <CAGsORuA=z6XzT+JgH83+n3jV2pzeKjHp5mBRz4oD0y1m4HAz+g@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Zhihao Yuan <zy@miator.net>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Concepts are Adjectives, not Nouns
Date: Mon, 9 Oct 2017 21:38:10 -0500
Lines: 175
Approved: news@gmane.org
Message-ID: <CAGsORuA=z6XzT+JgH83+n3jV2pzeKjHp5mBRz4oD0y1m4HAz+g@mail.gmail.com>
References: <7e0b8951-a46a-470d-bb7c-1651e6c4d707@isocpp.org>
 <c5c43c70-2ffe-4654-9756-69facbf4cb0a@isocpp.org> <22229cfe-0d43-5c01-cef4-b6502de658c1@honermann.net>
 <CAGsORuD3YNwpPoYgi-zypuibgnAJL7uywu-odFknC+iynR+QpA@mail.gmail.com> <9fb3dbcb-87ab-a6fe-dd71-c6ed08309161@honermann.net>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="94eb2c1256fcc0fda3055b2832eb"
X-Trace: blaine.gmane.org 1507603096 22299 195.159.176.226 (10 Oct 2017 02:38:16 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 10 Oct 2017 02:38:16 +0000 (UTC)
To: "std-proposals@isocpp.org" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCSKRWMD4EHBBFPF6DHAKGQE2SNIBQQ@isocpp.org Tue Oct 10 04:38:11 2017
Return-path: <std-proposals+bncBCSKRWMD4EHBBFPF6DHAKGQE2SNIBQQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ua0-f199.google.com ([209.85.217.199])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCSKRWMD4EHBBFPF6DHAKGQE2SNIBQQ@isocpp.org>)
	id 1e1kQo-0004ka-SD
	for gclcip-std-proposals@m.gmane.org; Tue, 10 Oct 2017 04:38:07 +0200
Original-Received: by mail-ua0-f199.google.com with SMTP id s9sf9818991uae.14
        for <gclcip-std-proposals@m.gmane.org>; Mon, 09 Oct 2017 19:38:14 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1507603094; cv=pass;
        d=google.com; s=arc-20160816;
        b=Ni7zupmzui70Tc+okgGrWsfe3+1U6HKHs6aTljxTE4SJT5FlKIXU1Vn+IROqn+8L5J
         MQr+ZSTKzKyJdXOtDO+4l653GH6ezESvXypHdsnh/lfDYoDIR/OzmxqsdBMIf4i7xZOe
         FDLjxGWqF3BCmW0aHzOuo1KnWFE8B20F1NOoE4ULAtsLzCYkfsumJceX0s9sxCAIO79g
         do2KxfSHNZZIXZFJrVSpwjjRNReTFahYK3g5d8KxixMO4dU7rc8w0Hk1BTxTfLXLmHVK
         Esq+8+RnNIkHPMXCk2q+MFKzh89H5gr35h9T2ILsi3qsxU8V/A2mNekMVRdf0064FL8V
         PIjw==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date
         :from:references:in-reply-to:mime-version:sender
         :arc-authentication-results:arc-message-signature
         :arc-authentication-results;
        bh=mqyADqNgaTZrijz7TLGlOPdp2KYZoX5XBIg3GVPgBMc=;
        b=kVNIdKduOkiuqHfsss/1Pfdh4yu9bBilWpTWjSPowm9K9ydAvvIypvzr3wLTQ6iRII
         nkCnfx47sYkKKkwTdBHMV8I1UasymEmCUbvgnhCODrbFXXPoExClyYufg7CBhE2HHIQH
         nJ/3Q9ibvCVQoDnFl0ljsCLGxYsDr26BKcMgOX/lnvERG9QkMKkRzblRoaBdF8JQGLSb
         ZC8wwglxqJ5WXpgOOb6cGdVnkcAhiy+xCppSBhwlIer8+i2iaCNyOWe1+yguQSw9yBKE
         tdl2yaF7Y6DqVwp7cM1oUuxrtdyZQfNseYYC3vf7F82KpcOewEik7ZouetMSwjywJlPo
         kwZA==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@miator.net header.s=krs header.b=bOxVhLwX;
       spf=pass (google.com: domain of bounce+3f9131.69110-std-proposals=isocpp.org@miator.net designates 184.173.153.196 as permitted sender) smtp.mailfrom=bounce+3f9131.69110-std-proposals=isocpp.org@miator.net
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:sender:mime-version:in-reply-to:references:from
         :date:message-id:subject:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=mqyADqNgaTZrijz7TLGlOPdp2KYZoX5XBIg3GVPgBMc=;
        b=XOPyPmf3iiUSajtoJWgtj3AHoRhqB56U8lRpGdtzmp/r5SQkbxGSiCLK3t7LNpEOXp
         zuC84L8OArx0+pp3WCbaB8Ht15MgCFQQbIDgkpXs3Iw3QJbBmFn1RzlCpsPYjme0AkiR
         MO4cwviUgXj98QTfzeXcw4DT28uQr6QvFlMussMd9qRnRD67zaINCutw7v2gve8YfWxF
         EaMpr05IusUDSV/vusj4QsSWx3YjlWk9/9g9nncHZUhdtSp/plZJSYvshlvT9T5RJo6E
         I5HFiGW1Yl2Mwsr+OocHusBSEaU8UAsSVr/+IRYoVPF+Hx9R5QdquFyBvlgmljqKjy8O
         0/Uw==
X-Gm-Message-State: AMCzsaX16d/wc9NSqFcuJuqDtU+9a4SUINcziqyuyMkxAnptpGkVoYvA
	dt8fCDrEU4ktB3g+fRzyddUSlQ==
X-Google-Smtp-Source: AOwi7QAhfSbHUn4BMiRhsOU6Z89iW4EYx+ecD0fKAaBK3sSupK+n55z+0BaUl7m/ngMIZOczmA2Gbw==
X-Received: by 10.55.17.225 with SMTP id 94mr5554910qkr.43.1507603093993;
        Mon, 09 Oct 2017 19:38:13 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.55.167.196 with SMTP id q187ls2446198qke.14.gmail; Mon, 09 Oct
 2017 19:38:13 -0700 (PDT)
X-Received: by 10.55.122.135 with SMTP id v129mr8861319qkc.171.1507603093334;
        Mon, 09 Oct 2017 19:38:13 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1507603093; cv=none;
        d=google.com; s=arc-20160816;
        b=dGv5Qc2aNMnuq7pmHJXZEMfSeF1kaydWQTu7J7maBHT7vIg7eNHTHeCdHiNiAQiatX
         xD1hn486aXDjtaoIiIQYrHqVAf/CiR8QGr0KKvpONMnpsn+2vKvIQ+QD03eVwMRnmveR
         ZlH3mlhVn2FDGy+O+1etPup4CXWBA10TbO2mNJ1mGfJGw037pE9TClLnRZRinVgV/Rbw
         tY2KEzJO91WoNkiEaWA+WStLzYnyyQ/4AfFZ/1PzvNU2nFQJtkaxuLD/8/i6riS9jZ9D
         DxSrIIvF7mA8JgqP/gFw4uVxMYQPrCPG4EAJ21+HMxn+FOHZFazt9C/y1Y+x5xAVXR1D
         1CLw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:references:in-reply-to:mime-version
         :sender:domainkey-signature:dkim-signature
         :arc-authentication-results;
        bh=+9T1OpM4EF//ltQIiE1dLPZRBaGl4OJ8Y/TmAiuqBfQ=;
        b=VXGxhOukEPUiOQjIrgStCNp9yhSh3hTr7NPVybyRYaV0ruh4XUpnPrGUPKAAsm6RfO
         a668dwszHOiTyXsva1rO1MBCIoIeOtuq2AFaOhfrEVRTYuf90s1ggeIUsN28pOzuO9QJ
         /qkzmXAMqiZ0gQy5tqjO6HU+uFyj7gc98i1l15kPJ6cL0gW2+4mw3qnVsm4LJaCLbIKf
         Bl+kC/tmC7P6EHb/fsmIfyoNjvqvgNON8NVztMf8YuXT+fQljc5ihMOoF6TVwBdPwX7H
         ZjNwUe/Vj0OaVVZUg3+0jmJxXUiMqj7DmTqW2Jy1v/Q+CIMGjttF42k5QrnjDgW7h/h6
         cEZQ==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@miator.net header.s=krs header.b=bOxVhLwX;
       spf=pass (google.com: domain of bounce+3f9131.69110-std-proposals=isocpp.org@miator.net designates 184.173.153.196 as permitted sender) smtp.mailfrom=bounce+3f9131.69110-std-proposals=isocpp.org@miator.net
Original-Received: from mail-s68.mailgun.info (mail-s68.mailgun.info. [184.173.153.196])
        by mx.google.com with UTF8SMTPS id c6si5240882qtg.57.2017.10.09.19.38.13
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Mon, 09 Oct 2017 19:38:13 -0700 (PDT)
Received-SPF: pass (google.com: domain of bounce+3f9131.69110-std-proposals=isocpp.org@miator.net designates 184.173.153.196 as permitted sender) client-ip=184.173.153.196;
Original-Sender: zy@miator.net
X-Mailgun-Sending-Ip: 184.173.153.196
X-Mailgun-Sid: WyI3MTBkYiIsICJzdGQtcHJvcG9zYWxzQGlzb2NwcC5vcmciLCAiNjkxMTAiXQ==
Original-Received: from mail-qt0-f175.google.com (mail-qt0-f175.google.com [209.85.216.175])
 by mxa.mailgun.org with ESMTP id 59dc3294.7fedd84e5b70-smtp-out-n02;
 Tue, 10 Oct 2017 02:38:12 -0000 (UTC)
Original-Received: by mail-qt0-f175.google.com with SMTP id z19so1799758qtg.11
        for <std-proposals@isocpp.org>; Mon, 09 Oct 2017 19:38:12 -0700 (PDT)
X-Received: by 10.237.44.194 with SMTP id g60mr17907265qtd.92.1507603091879;
 Mon, 09 Oct 2017 19:38:11 -0700 (PDT)
Original-Received: by 10.237.50.38 with HTTP; Mon, 9 Oct 2017 19:38:10 -0700 (PDT)
In-Reply-To: <9fb3dbcb-87ab-a6fe-dd71-c6ed08309161@honermann.net>
X-Gmail-Original-Message-ID: <CAGsORuA=z6XzT+JgH83+n3jV2pzeKjHp5mBRz4oD0y1m4HAz+g@mail.gmail.com>
X-Original-Sender: zy@miator.net
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@miator.net header.s=krs header.b=bOxVhLwX;       spf=pass
 (google.com: domain of bounce+3f9131.69110-std-proposals=isocpp.org@miator.net
 designates 184.173.153.196 as permitted sender) smtp.mailfrom=bounce+3f9131.69110-std-proposals=isocpp.org@miator.net
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:34727
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/34727>

--94eb2c1256fcc0fda3055b2832eb
Content-Type: text/plain; charset="UTF-8"

On Mon, Oct 9, 2017 at 7:12 PM, Tom Honermann <tom@honermann.net> wrote:

> On 10/09/2017 06:36 PM, Zhihao Yuan wrote:
>
>   template <Red T>
>   void foo(T x);
>
> The inconsistency argument is that in every other context in which we see
> something like 'Red T', T names a non-type (variable, data member,
> function) entity.
>

Haskell does the opposite, so I totally don't mind.


> While I (so far) don't find these issues strongly concerning, the fact
> that the concepts-as-abbreviations proposal fixes them while providing a
> more useful syntax (the ability to compose concepts without having to name
> them or reach for a requires clause) is welcome, encouraging, and
> suggestive of stronger design cohesion.
>

I wish I don't have to define a macro for each concept,

  #define Red(x) Red typename x
  template <Red(T)>

just to stay away from the noises.

Haskell solves this by

  template <(Red T, TotallyOrdered T)>


And of course, some folks just really really don't like the template header
> and the requirement to name the type parameter.
>
>
I think we need to establish a rule, saying that changing
a syntax caused by "dislike" requires you hate it enough
by inventing macros.  Thus, you find that its ugliness
overwhelmed that of macros; otherwise the hatred isn't
enough.

Yes.  But so far, every use of a disjunction I've seen has been trivially
> replaced (for performance reasons) with a constexpr function that evaluates
> the disjunction.  For example:
>
> https://github.com/tahonermann/text_view/blob/master/
> include/text_view_detail/concepts.hpp#L30-L70
>
> I haven't thought about it deeply, but I think the semantic concepts
> changes from P0717R0 [1] adopted in Toronto have further reduced the use
> cases for disjunctive concepts.
>
>
That makes sense.  I don't have a use case for doing
refinement over concept disjunctions.  A. Sutton can
correct me :)

-- 
Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.
_______________________________________________

-- 
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/CAGsORuA%3Dz6XzT%2BJgH83%2Bn3jV2pzeKjHp5mBRz4oD0y1m4HAz%2Bg%40mail.gmail.com.

--94eb2c1256fcc0fda3055b2832eb
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Mon, Oct 9, 2017 at 7:12 PM, Tom Honermann <span dir=3D=
"ltr">&lt;<a target=3D"_blank" href=3D"mailto:tom@honermann.net">tom@honerm=
ann.net</a>&gt;</span> wrote:<br><div class=3D"gmail_extra"><div class=3D"g=
mail_quote"><blockquote style=3D"margin:0px 0px 0px 0.8ex;border-left:1px s=
olid rgb(204,204,204);padding-left:1ex" class=3D"gmail_quote">
 =20
   =20
 =20
  <div bgcolor=3D"#FFFFFF"><span><div class=3D"gmail-m_-3264257862931883237=
m_-4471814976536502841moz-cite-prefix">On 10/09/2017 06:36 PM, Zhihao Yuan
      wrote:<br>
    </div>
    </span><span><blockquote type=3D"cite"><div dir=3D"ltr"><div class=3D"g=
mail_extra"><div class=3D"gmail_quote"><div>=C2=A0 template &lt;Red T&gt;<b=
r>
            </div>
            <div>=C2=A0 void foo(T x);<br>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    </span>
    The inconsistency argument is that in every other context in which
    we see something like &#39;Red T&#39;, T names a non-type (variable, da=
ta
    member, function) entity.<br></div></blockquote><div><br></div><div>Has=
kell does the opposite, so I totally don&#39;t mind.<br></div><div>=C2=A0</=
div><blockquote style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb=
(204,204,204);padding-left:1ex" class=3D"gmail_quote"><div bgcolor=3D"#FFFF=
FF">
    While I (so far) don&#39;t find these issues strongly concerning, the
    fact that the concepts-as-abbreviations proposal fixes them while
    providing a more useful syntax (the ability to compose concepts
    without having to name them or reach for a requires clause) is
    welcome, encouraging, and suggestive of stronger design cohesion.<br></=
div></blockquote><div><br></div><div>I wish I don&#39;t have to define a ma=
cro for each concept,<br><br></div><div>=C2=A0 #define Red(x) Red typename =
x<br></div><div>=C2=A0 template &lt;Red(T)&gt;<br></div><div><br></div><div=
>just to stay away from the noises.<br><br></div><div>Haskell solves this b=
y<br><br></div><div>=C2=A0 template &lt;(Red T, TotallyOrdered T)&gt;<br></=
div><div><br><br></div><blockquote style=3D"margin:0px 0px 0px 0.8ex;border=
-left:1px solid rgb(204,204,204);padding-left:1ex" class=3D"gmail_quote"><d=
iv bgcolor=3D"#FFFFFF">
    And of course, some folks just really really don&#39;t like the templat=
e
    header and the requirement to name the type parameter.<span><br>
    <br></span></div></blockquote><div><br></div><div>I think we need to es=
tablish a rule, saying that changing<br></div><div>a syntax caused by &quot=
;dislike&quot; requires you hate it enough<br></div><div>by inventing macro=
s.=C2=A0 Thus, you find that its ugliness<br>overwhelmed that of macros; ot=
herwise the hatred isn&#39;t<br>enough.<br></div><div><br></div><blockquote=
 style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);p=
adding-left:1ex" class=3D"gmail_quote"><div bgcolor=3D"#FFFFFF"><span></spa=
n>Yes.=C2=A0 But so far, every use of a disjunction I&#39;ve seen has been
    trivially replaced (for performance reasons) with a constexpr
    function that evaluates the disjunction.=C2=A0 For example:<br>
    <br>
<a target=3D"_blank" href=3D"https://github.com/tahonermann/text_view/blob/=
master/include/text_view_detail/concepts.hpp#L30-L70" class=3D"gmail-m_-326=
4257862931883237m_-4471814976536502841moz-txt-link-freetext">https://github=
..com/tahonermann<wbr>/text_view/blob/master/<wbr>include/text_view_detail/<=
wbr>concepts.hpp#L30-L70</a><br>
    <br>
    I haven&#39;t thought about it deeply, but I think the semantic concept=
s
    changes from P0717R0 [1] adopted in Toronto have further reduced the
    use cases for disjunctive concepts.<br>
    <br clear=3D"all"></div></blockquote><div><br></div><div>That makes sen=
se.=C2=A0 I don&#39;t have a use case for doing<br>refinement over concept =
disjunctions.=C2=A0 A. Sutton can<br></div><div>correct me :)<br></div></di=
v><br>-- <br><div class=3D"gmail-m_-3264257862931883237gmail_signature"><di=
v dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D"ltr"><div>Zhihao Yuan,=
 ID lichray<br>The best way to predict the future is to invent it.<br>_____=
_________________________<wbr>_________________<br></div></div></div></div>=
</div></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&quot; 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/CAGsORuA%3Dz6XzT%2BJgH83%2Bn3jV2pzeKj=
Hp5mBRz4oD0y1m4HAz%2Bg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfoo=
ter">https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAGsORuA%=
3Dz6XzT%2BJgH83%2Bn3jV2pzeKjHp5mBRz4oD0y1m4HAz%2Bg%40mail.gmail.com</a>.<br=
 />

--94eb2c1256fcc0fda3055b2832eb--

.
