220 16766 <CA+cyFgvUX2wwGUF4rXgD7+ZB1uBG5A6rwTV0uAof9nAbAoNQXw@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: "'Geoffrey Romer' via ISO C++ Standard - Discussion" <std-discussion@isocpp.org>
Newsgroups: gmane.comp.lang.c++.isocpp.general,gmane.comp.lang.c++.isocpp.proposals
Subject: Re: [c++std-core-27199] Re: [std-proposals] Re: Re:
 An implementation of enhanced auto deduction and abbreviated template syntax
 using Clang
Date: Thu, 5 Mar 2015 10:10:44 -0800
Lines: 148
Approved: news@gmane.org
Message-ID: <CA+cyFgvUX2wwGUF4rXgD7+ZB1uBG5A6rwTV0uAof9nAbAoNQXw@mail.gmail.com>
References: <CABsSThrwV0UCbrmoxoeQUskOjvF2+RX5ctpSq3dPMPxm=t6mww@mail.gmail.com>
	<7c7d06ea-1e25-4720-9486-ec068b514ea6@isocpp.org>
	<CA+cyFgvMsbM0Tczjvy=dkJ1SpgtMNtjZtxzOxH8+N8QxuyzwEw@mail.gmail.com>
	<CAJcCCPPqBt1iO3g_unhVPATT6cemOikVWzDVmsEL9dFLnmRMCA@mail.gmail.com>
	<CA+cyFgt-JvWDJTwgUvS8qz-yXPshQKwntLjXPY=tBfNec8GkfQ@mail.gmail.com>
	<CAGg_6+NiuSQMO1RHNJJc=-jK-qC75+K+=GgCg8z35O_EUZJ3=Q@mail.gmail.com>
Reply-To: std-discussion@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a11c1092e86533805108e7c3e
X-Trace: ger.gmane.org 1425579048 11874 80.91.229.3 (5 Mar 2015 18:10:48 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 5 Mar 2015 18:10:48 +0000 (UTC)
Cc: "std-proposals@isocpp.org" <std-proposals@isocpp.org>, 
	"std-discussion@isocpp.org" <std-discussion@isocpp.org>, Faisal Vali <faisalv@gmail.com>
To: c++std-core@accu.org
Original-X-From: std-discussion+bncBD74DCN5SYHBBJNY4KTQKGQEUMRX75A@isocpp.org Thu Mar 05 19:10:47 2015
Return-path: <std-discussion+bncBD74DCN5SYHBBJNY4KTQKGQEUMRX75A@isocpp.org>
Envelope-to: gclcig-std-discussion@m.gmane.org
Original-Received: from mail-oi0-f71.google.com ([209.85.218.71])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-discussion+bncBD74DCN5SYHBBJNY4KTQKGQEUMRX75A@isocpp.org>)
	id 1YTaEQ-00067H-MK
	for gclcig-std-discussion@m.gmane.org; Thu, 05 Mar 2015 19:10:46 +0100
Original-Received: by oiba3 with SMTP id a3sf74719800oib.2
        for <gclcig-std-discussion@m.gmane.org>; Thu, 05 Mar 2015 10:10:45 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:date
         :message-id:subject:from:to:cc:content-type: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=6ggUCxp3OyKMNGJfa4FPC2vwWOkie/GWMNHXxQxaDrc=;
        b=fF2fssraVIdM7fbdkqLW82SCy3IueKVEA1axhk471qenFfXHXX9gX4OcwPJ2jMsxqI
         5Hxsja5CVRmgFbvYjeaEYWvIRKMG2hcP48pyk/AFQitE3xhWKKqLSHtQWzORawZxKXu2
         s9IREj0RU7nN1VObZ92yKfXU2UoqveAeMCj8q0LCv1vnvcC2VftOVxF8R4x78NDPBizJ
         vu2UKxe1ikMPh0FTwsi36CKBc0Jkx6IcwAuoSvqb6vuo28pCNYcn9UirrDhoOqK68l/1
         x3uoYqwnrPxPFxHEOUxN/hA15PjM4KIwHNAg7/g/mAHe54wY+oc3VwlOr+16jrrwmqii
         DSIA==
X-Gm-Message-State: ALoCoQm7UhSzIiKKD2iAd/MELlFziZ/z8PKqugoHinIjRXC2OJtr62X7LoYxp8HJ5SreV/7IV0Lv
X-Received: by 10.182.163.108 with SMTP id yh12mr11281134obb.43.1425579045486;
        Thu, 05 Mar 2015 10:10:45 -0800 (PST)
X-BeenThere: std-discussion@isocpp.org
Original-Received: by 10.140.107.182 with SMTP id h51ls1272086qgf.91.gmail; Thu, 05 Mar
 2015 10:10:44 -0800 (PST)
X-Received: by 10.55.52.200 with SMTP id b191mr20764375qka.46.1425579044736;
        Thu, 05 Mar 2015 10:10:44 -0800 (PST)
Original-Received: from mail-qg0-x231.google.com (mail-qg0-x231.google.com. [2607:f8b0:400d:c04::231])
        by mx.google.com with ESMTPS id i204si6656205qhc.53.2015.03.05.10.10.44
        for <std-discussion@isocpp.org>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Thu, 05 Mar 2015 10:10:44 -0800 (PST)
Received-SPF: pass (google.com: domain of gromer@google.com designates 2607:f8b0:400d:c04::231 as permitted sender) client-ip=2607:f8b0:400d:c04::231;
Original-Received: by qgdz107 with SMTP id z107so6611871qgd.4
        for <std-discussion@isocpp.org>; Thu, 05 Mar 2015 10:10:44 -0800 (PST)
X-Received: by 10.140.34.168 with SMTP id l37mr13811958qgl.28.1425579044122;
 Thu, 05 Mar 2015 10:10:44 -0800 (PST)
Original-Received: by 10.96.179.229 with HTTP; Thu, 5 Mar 2015 10:10:43 -0800 (PST)
In-Reply-To: <CAGg_6+NiuSQMO1RHNJJc=-jK-qC75+K+=GgCg8z35O_EUZJ3=Q@mail.gmail.com>
X-Original-Sender: gromer@google.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of gromer@google.com designates 2607:f8b0:400d:c04::231 as permitted
 sender) smtp.mail=gromer@google.com;       dkim=pass header.i=@google.com;
       dmarc=pass (p=REJECT dis=NONE) header.from=google.com
Precedence: list
Mailing-list: list std-discussion@isocpp.org; contact std-discussion+owners@isocpp.org
List-ID: <std-discussion.isocpp.org>
X-Google-Group-Id: 495566654649
List-Post: <http://groups.google.com/a/isocpp.org/group/std-discussion/post>, <mailto:std-discussion@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-discussion+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-discussion/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-discussion/subscribe>,
 <mailto:std-discussion+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+495566654649+unsubscribe@googlegroups.com>,
 <http://groups.google.com/a/isocpp.org/group/std-discussion/subscribe>
X-Original-From: Geoffrey Romer <gromer@google.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.general:4977 gmane.comp.lang.c++.isocpp.proposals:16766
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.general/4977>

--001a11c1092e86533805108e7c3e
Content-Type: text/plain; charset=UTF-8

On Thu, Mar 5, 2015 at 9:25 AM, Nevin Liber <nevin@eviloverlord.com> wrote:

> On 5 March 2015 at 11:11, 'Geoffrey Romer' via ISO C++ Standard - Future
> Proposals <std-proposals@isocpp.org> wrote:
>
>>
>> This doesn't convey any useful information:
>>>
>>> template<typename T>
>>>   void frob(T);
>>>
>>
>> I don't agree; it tells me that frob is a generic operation that works
>> with roughly any type T.
>>
>
> But what does that mean?  Sure, I can copy/move it (since it was passed by
> value), but any other constraints will be dictated by the body of frob.
>

My point is that the use of a generic, meaningless parameter name like "T"
tacitly documents the fact that frob isn't going to dictate many additional
constraints, beyond perhaps highly generic ones like being able to compare
for equality.


>
>
>>
>>
>>> so in terms of describing the interface it's no different when written
>>> like this:
>>>
>>> void frob(auto);
>>>
>>
>> This is different because now I don't know anything about the
>> requirements or semantics of the parameter type.
>>
>
> I'm just not seeing how that is any different (other than the incredibly
> minor of having to call decltype on its parameter to get its type).
>
> Do you have an example function body that works with frob(T) but doesn't
> work with frob(auto) (or vice versa) for a specific concrete type?  I'm
> really trying to understand the difference you see between these two forms.
>

I'm not aware of any code that will work with one form but not the other.
My point is simply that "auto" conveys less information to me as a human
reader than a named template parameter would.


> --
>  Nevin ":-)" Liber  <mailto:nevin@eviloverlord.com>  (847) 691-1404
>

-- 

--- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-discussion+unsubscribe@isocpp.org.
To post to this group, send email to std-discussion@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-discussion/.

--001a11c1092e86533805108e7c3e
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 Thu, Mar 5, 2015 at 9:25 AM, Nevin Liber <span dir=3D"ltr">&lt;<a href=
=3D"mailto:nevin@eviloverlord.com" target=3D"_blank">nevin@eviloverlord.com=
</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin=
:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><=
span class=3D"">On 5 March 2015 at 11:11, &#39;Geoffrey Romer&#39; via ISO =
C++ Standard - Future Proposals <span dir=3D"ltr">&lt;<a href=3D"mailto:std=
-proposals@isocpp.org" target=3D"_blank">std-proposals@isocpp.org</a>&gt;</=
span> wrote:<br></span><div class=3D"gmail_extra"><div class=3D"gmail_quote=
"><span class=3D""><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 cla=
ss=3D"gmail_extra"><br><div class=3D"gmail_quote"><span><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex">This doesn&#39;t convey any useful information:<br>
<br>
template&lt;typename T&gt;<br>
=C2=A0 void frob(T);<br></blockquote><div><br></div></span><div>I don&#39;t=
 agree; it tells me that frob is a generic operation that works with roughl=
y any type T.</div></div></div></div></blockquote><div><br></div></span><di=
v>But what does that mean?=C2=A0 Sure, I can copy/move it (since it was pas=
sed by value), but any other constraints will be dictated by the body of fr=
ob.</div></div></div></div></blockquote><div><br></div><div>My point is tha=
t the use of a generic, meaningless parameter name like &quot;T&quot; tacit=
ly documents the fact that frob isn&#39;t going to dictate many additional =
constraints, beyond perhaps highly generic ones like being able to compare =
for equality.</div><div>=C2=A0</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 class=3D"gmail_extra"><div class=3D"gmail_quote"><span class=
=3D""><div>=C2=A0</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=
 class=3D"gmail_extra"><div class=3D"gmail_quote"><span><div>=C2=A0</div><b=
lockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px =
#ccc solid;padding-left:1ex">so in terms of describing the interface it&#39=
;s no different when written<br>
like this:<br>
<br>
void frob(auto);<br></blockquote><div><br></div></span><div>This is differe=
nt because now I don&#39;t know anything about the requirements or semantic=
s of the parameter type.</div></div></div></div></blockquote><div><br></div=
></span><div>I&#39;m just not seeing how that is any different (other than =
the incredibly minor of having to call decltype on its parameter to get its=
 type).</div><div><br></div><div>Do you have an example function body that =
works with frob(T) but doesn&#39;t work with frob(auto) (or vice versa) for=
 a specific concrete type?=C2=A0 I&#39;m really trying to understand the di=
fference you see between these two forms.</div></div></div></div></blockquo=
te><div><br></div><div>I&#39;m not aware of any code that will work with on=
e form but not the other. My point is simply that &quot;auto&quot; conveys =
less information to me as a human reader than a named template parameter wo=
uld.</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margi=
n:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">=
<div class=3D"gmail_extra"><span class=3D"HOEnZb"><font color=3D"#888888">-=
- <br><div>=C2=A0Nevin &quot;:-)&quot; Liber=C2=A0 &lt;mailto:<a href=3D"ma=
ilto:nevin@eviloverlord.com" target=3D"_blank">nevin@eviloverlord.com</a>&g=
t;=C2=A0 <a href=3D"tel:%28847%29%20691-1404" value=3D"+18476911404" target=
=3D"_blank">(847) 691-1404</a></div>
</font></span></div></div>
</blockquote></div><br></div></div>

<p></p>

-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Discussion&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-discussion+unsubscribe@isocpp.org">std-discus=
sion+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-discussion@isocp=
p.org">std-discussion@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-discussion/">http://groups.google.com/a/isocpp.org/group/std-discussion=
/</a>.<br />

--001a11c1092e86533805108e7c3e--

.
