220 37090 <CA+Om+SgAn+acLBxzeEGPCYRw4B2FLvm5G0ZQ2Htjtpi-=5sn0Q@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Corentin <corentin.jabot@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: specify concept implementation
Date: Mon, 26 Feb 2018 21:21:03 +0000
Lines: 151
Approved: news@gmane.org
Message-ID: <CA+Om+SgAn+acLBxzeEGPCYRw4B2FLvm5G0ZQ2Htjtpi-=5sn0Q@mail.gmail.com>
References: <93e7e509-edf0-4df6-9b2f-555bba92a04a@isocpp.org>
 <a1345907-f673-43f5-afb8-3ad064a0a6d6@isocpp.org> <805d3933-0cf9-465f-906c-849ab25c7a63@isocpp.org>
 <CALmDwq1g4Sag=9c_eW3Qdy3KOUiHmhQTG1RB4fC1ZcgO6BfOtA@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="001a113cd4f6f6e6bc0566241607"
X-Trace: blaine.gmane.org 1519679954 15637 195.159.176.226 (26 Feb 2018 21:19:14 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Mon, 26 Feb 2018 21:19:14 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC72FQ6X7MLRBSXU2HKAKGQEQ74ZIRQ@isocpp.org Mon Feb 26 22:19:10 2018
Return-path: <std-proposals+bncBC72FQ6X7MLRBSXU2HKAKGQEQ74ZIRQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oi0-f70.google.com ([209.85.218.70])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBC72FQ6X7MLRBSXU2HKAKGQEQ74ZIRQ@isocpp.org>)
	id 1eqQAv-0003V7-DC
	for gclcip-std-proposals@m.gmane.org; Mon, 26 Feb 2018 22:19:09 +0100
Original-Received: by mail-oi0-f70.google.com with SMTP id o4sf4362974oib.15
        for <gclcip-std-proposals@m.gmane.org>; Mon, 26 Feb 2018 13:21:16 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1519680075; cv=pass;
        d=google.com; s=arc-20160816;
        b=VCLnLMuuChSJdmBkmOo0WlLSMZODm7suN5Zwjmddau7BLceuAtauC/XLZyREFLp8xC
         Mc/EqO0fY2FT+bFRRpifAS6xklkG+tZ1iKbW0e1uBtKGkIBaR9XxMs5Hdu3dU3asm4Qm
         9eAcLcZzO47NncnfiwB7PX8XsevJBtT9oIla5n0plx8vIqwi/jBoyKd8De2uEzwqR0cm
         rJGpajBoeGbN+djVeDzdlxgg5tx4VbHHgD7nkmiKKBDNhUDf6CWvelxzL+TXwKk2c/uD
         d38x70QA2Qn9k3yNNBGtZq+ma9CZHEqm0Vem9R8PsXaIbYFxKCCADQRUEo6lLqRxsZDX
         mzYg==
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:in-reply-to:references:mime-version:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=QYIvjl76CtXMFm1J0aHz3NcTKrIcRCWAzOfvd9KFoxM=;
        b=Yh1jEL1jGoIEAhC8pte9MQiSEnL5mbA6p5u8NM3BppkKSfPrOVcitCzJQeu4zoz1l/
         1Z40GfQ0V+3HPBC9qy3xsGU2RCWCiagnRsQlg5PNqxEr/Ajx9b/aOsD8C/8Fn3lTQis5
         XbWD8pS4951vTQsW78qVKvMCDF80++OvoX5pFZjW813dBM7Ik5dz46R0XZZkOQ+rFB7G
         JUivEK8VynAgedVHj87yVGZg7D4cCwvGkwnDnWn4KRMax20wyWR/7EoYCsRVGsyM2PHO
         HPnrHfMWLnP8/T456UXNdfDllOxyoUGgq+d5t6GFU3WmTBjQsqO4QM7auoeznmasGr0o
         zGJg==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=jwTk2IV2;
       spf=pass (google.com: domain of corentin.jabot@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=corentin.jabot@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:references:in-reply-to:from:date:message-id:subject:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=QYIvjl76CtXMFm1J0aHz3NcTKrIcRCWAzOfvd9KFoxM=;
        b=z9zbbb/ioFp/jSBTUQqSGfJCo89sEBxLULH00tc6nzhqJWOWO1jDCBCIbiVHJ7qd2C
         MRbrxRNedkxnjsmMemFybW0scOOc/ka2STxpZ/k1ZUosVnJSHemC9u14gCcvd2vq0WTO
         EbpujFAPf6o40wW9XNXZSX4LvVnaLjAfiu2j2e7qp0lZ8NcZXMXJZn9MW6ygPd1ukS1x
         Pypad/8M9Q2p6eZvdFzj2sS7cxpVDUfSeUueT+XYZ6pSt7Di2GDHY2mXbV++3QHIwBor
         9SpNe3VYjANgEhJq6QkITNyXvjCna3D+1EvyndfyeKNvldmgWTPj/jgpcmLEimezajPv
         8zmg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:references:in-reply-to: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=QYIvjl76CtXMFm1J0aHz3NcTKrIcRCWAzOfvd9KFoxM=;
        b=CL+hMrxj1+bBmsnmDlBA/nvNxWRIOA9dsMx4ArP8R3fpHnvrz1LUrk9Ck2lXtPS+OT
         eG6btq3q5qieBhymVmSiod5WU1itfQgF9cFNzhH+V82H7rJzEBPbUx6aG6KmJXnY/u9m
         +ugqkNi4oeNjWSghpJvFtrqq+MsOxwhQwdwsqFv3+Ls0R6Rea/sskYwUKsk/COc/3n8W
         20ZlQsLUjzfx9iR5gwDhW1IOdX6+nVhFlBocCkyzxyaFElYX1hGjXorQYRSDrZ/842sQ
         yBmo4umuO2KgLeEg7iDJnAGS2bk28olWqOdxZ9z0IVRy9XlAKAcFbFmUBnjGyvkpHp3m
         93hA==
X-Gm-Message-State: APf1xPDqJXxf/KlgcBeu8Q6zvL1UiYu8S7AD2IhzpgcYvYm9TxBcAFPE
	QlBZLMVQHwcejWDWVeyIlNOizA==
X-Google-Smtp-Source: AG47ELv41RMoX0n0EaDzwGj8PDV7Xq26G7PUKqSKHBRefHuud++2wSPq4MhcLs1aws3OvQ0YIhOtmA==
X-Received: by 10.202.166.199 with SMTP id t68mr5944882oij.34.1519680075594;
        Mon, 26 Feb 2018 13:21:15 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.26.6 with SMTP id a6ls1204610ote.16.gmail; Mon, 26 Feb
 2018 13:21:14 -0800 (PST)
X-Received: by 10.157.83.16 with SMTP id g16mr8379798oth.270.1519680074362;
        Mon, 26 Feb 2018 13:21:14 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1519680074; cv=none;
        d=google.com; s=arc-20160816;
        b=zkWISH7TtZow8LoN/AbvFHYZD1mcAolAIWHk51e8+TADj6ya+d4zk3ASigjeS46UG0
         Cct3pqftYdAm5t968EaZAV8EWSBX9MM19M0xhsVBY/w2tz6fwWMpxloDALKlIImYvafy
         W2Cs27DVz6Yc0xJS7XPuNk23bNMhcapuEa3V8Lg1+64LP+fLiSiDrjseiFzdb3uz2p08
         ePDNgdK2FBwELXArJ4tYgDGf5WZJSJMjIh8prRc8BxytwK6IyeAs3f0jl+v/5Yn+AaTK
         7L1SZeoh9FQYSvfC4fbkkwvcuy1TPkwCORYSUOhnQdXRGSmJ2+LeSII/5NQ/sTixXbdd
         s9bQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:in-reply-to:references:mime-version
         :dkim-signature:arc-authentication-results;
        bh=OEm9xlj6/k3FIwY4IWZ0b9JEpffrI8f/6+EpOvvxuCo=;
        b=HabYP3gcN+UjIX2bbY11w74Fk4mDad4FaRBhYd6114fxAaq0vx4+/yfoOuW9ngn4jc
         uRO2UDPXT3GMaOJnGepqQyVKkDn5/VkUhQXjeYVljlP9AZLdtCN9sSVXd+3Vi+70UjJZ
         xIQEhhxJFojoU8F9Sm9OcEerWuxO1lWNCL6nOZsSOSR721VjbAIh4vwZKmv+dKLIU+XQ
         6yYdr9bdifABzOPEUz15qaVvG/We+ZNYBQAPPisSMqbmc87cPsuEtYY04cGdjVNUiwoL
         NuqoSwtSsyTHPn+Wp5jGEQsZ59nb2u7csYj8D2DEAmwkLZtKO5+7ybyvx5PtF3eKv5nR
         PE1w==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=jwTk2IV2;
       spf=pass (google.com: domain of corentin.jabot@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=corentin.jabot@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Original-Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
        by mx.google.com with SMTPS id c145sor3767182oig.15.2018.02.26.13.21.14
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Mon, 26 Feb 2018 13:21:14 -0800 (PST)
Received-SPF: pass (google.com: domain of corentin.jabot@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 10.202.169.140 with SMTP id s134mr7901146oie.318.1519680073687;
 Mon, 26 Feb 2018 13:21:13 -0800 (PST)
In-Reply-To: <CALmDwq1g4Sag=9c_eW3Qdy3KOUiHmhQTG1RB4fC1ZcgO6BfOtA@mail.gmail.com>
X-Original-Sender: corentin.jabot@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=jwTk2IV2;       spf=pass
 (google.com: domain of corentin.jabot@gmail.com designates 209.85.220.41 as
 permitted sender) smtp.mailfrom=corentin.jabot@gmail.com;       dmarc=pass
 (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: 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:37090
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/37090>

--001a113cd4f6f6e6bc0566241607
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

I have a somewhat philosophical view on that.
If we have a syntax to tightly couple a concept to a satisfying
declaration, then is it still a concept ? Because it starts to look more
like regular interface / inheritance.

I see why one would want to document that a class satisfies a concept, but
when it stops to do so, does that means that the class is somehow broken
and should be ill-formed ?

I think the implicit nature of concepts is important and obviously
powerful. For this reason, I think the static_assert method is best.

While not directly comparable to concepts, Go interfaces are implicit and
it does seems to work  even on large codebases





Le lun. 26 f=C3=A9vr. 2018 =C3=A0 21:04, Nicolas Lesser <blitzrakete@gmail.=
com> a
=C3=A9crit :

> As for static_assert, no it's not.
>> static_assert on an explicit concept call only triggers a "something wen=
t
>> wrong" level of informations: https://godbolt.org/g/5Hb7zP
>>
>
> That's a quality of implementation issue. I fully expect gcc to improve
> this error message in the future.
>
> I agree though that a whole language feature would be overkill.
>> What about an attribute?
>>
>
> Why not use requires?
>
> struct A requires C<A> {};
>
> It looks more like a function constraint and doesn't require any weird
> language feature. Also, attributes should not change the meaning of the
> program if they are ignored, so using attributes is a non-starter.
>
> --
> 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/CALmDwq1g4Sa=
g%3D9c_eW3Qdy3KOUiHmhQTG1RB4fC1ZcgO6BfOtA%40mail.gmail.com
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CALmDwq1g4S=
ag%3D9c_eW3Qdy3KOUiHmhQTG1RB4fC1ZcgO6BfOtA%40mail.gmail.com?utm_medium=3Dem=
ail&utm_source=3Dfooter>
> .
>

--=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/CA%2BOm%2BSgAn%2BacLBxzeEGPCYRw4B2FLvm5G0ZQ2Htjt=
pi-%3D5sn0Q%40mail.gmail.com.

--001a113cd4f6f6e6bc0566241607
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div>I have a somewhat philosophical view on that.</di=
v><div>If we have a syntax to tightly couple a concept to a satisfying decl=
aration, then is it still a concept ? Because it starts to look more like r=
egular interface / inheritance.</div><div><br></div><div>I see why one woul=
d want to document that a class satisfies a concept, but when it stops to d=
o so, does that means that the class is somehow broken and should be ill-fo=
rmed ?</div><div><br></div><div>I think the implicit nature of concepts is =
important and obviously powerful. For this reason, I think the static_asser=
t method is best.</div><div><br></div><div>While not directly comparable to=
 concepts, Go interfaces are implicit and it does seems to work=C2=A0 even =
on large codebases</div><div><br></div><div><br></div><div><br></div><div><=
br></div><br><div class=3D"gmail_quote"><div dir=3D"ltr">Le=C2=A0lun. 26 f=
=C3=A9vr. 2018 =C3=A0=C2=A021:04, Nicolas Lesser &lt;<a href=3D"mailto:blit=
zrakete@gmail.com" target=3D"_blank">blitzrakete@gmail.com</a>&gt; a =C3=A9=
crit=C2=A0:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 =
0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div c=
lass=3D"gmail_extra"><div class=3D"gmail_quote"><blockquote class=3D"gmail_=
quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1=
ex"><div dir=3D"ltr"><div>As for static_assert, no it&#39;s not.<br></div><=
div>static_assert on an explicit concept call only triggers a &quot;somethi=
ng went wrong&quot; level of informations:=C2=A0<a href=3D"https://godbolt.=
org/g/5Hb7zP" target=3D"_blank">https://godbolt.org/g/5Hb7zP</a></div></div=
></blockquote><div><br></div></div></div></div><div dir=3D"ltr"><div class=
=3D"gmail_extra"><div class=3D"gmail_quote"><div>That&#39;s a quality of im=
plementation issue. I fully expect gcc to improve this error message in the=
 future.</div></div></div></div><div dir=3D"ltr"><div class=3D"gmail_extra"=
><div class=3D"gmail_quote"><div><br></div><blockquote class=3D"gmail_quote=
" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><=
div dir=3D"ltr"><div>I agree though that a whole language feature would be =
overkill.</div><div>What about an attribute?</div></div></blockquote><div><=
br></div></div></div></div><div dir=3D"ltr"><div class=3D"gmail_extra"><div=
 class=3D"gmail_quote"><div>Why not use requires?</div><div><br></div><div>=
struct A requires C&lt;A&gt; {};</div><div><br></div><div>It looks more lik=
e a function constraint and doesn&#39;t require any weird language feature.=
 Also, attributes should not change the meaning of the program if they are =
ignored, so using attributes is a non-starter.</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" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">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/CALmDwq1g4Sag%3D9c_eW3Qdy3KOUiHmhQTG1=
RB4fC1ZcgO6BfOtA%40mail.gmail.com?utm_medium=3Demail&amp;utm_source=3Dfoote=
r" target=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/std-pro=
posals/CALmDwq1g4Sag%3D9c_eW3Qdy3KOUiHmhQTG1RB4fC1ZcgO6BfOtA%40mail.gmail.c=
om</a>.<br>
</blockquote></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/CA%2BOm%2BSgAn%2BacLBxzeEGPCYRw4B2FLv=
m5G0ZQ2Htjtpi-%3D5sn0Q%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfoo=
ter">https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CA%2BOm%2=
BSgAn%2BacLBxzeEGPCYRw4B2FLvm5G0ZQ2Htjtpi-%3D5sn0Q%40mail.gmail.com</a>.<br=
 />

--001a113cd4f6f6e6bc0566241607--

.
