220 16805 <CAOHCbitiPm7SKQwXSBWrV2KOhNsAPcmGW7JZ1B13VO57Fip2ig@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Tony V E <tvaneerd@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: [c++std-core-27216] Re: An implementation of
 enhanced auto deduction and abbreviated template syntax using Clang
Date: Fri, 6 Mar 2015 02:07:17 -0500
Lines: 93
Approved: news@gmane.org
Message-ID: <CAOHCbitiPm7SKQwXSBWrV2KOhNsAPcmGW7JZ1B13VO57Fip2ig@mail.gmail.com>
References: <CABsSThrwV0UCbrmoxoeQUskOjvF2+RX5ctpSq3dPMPxm=t6mww@mail.gmail.com>
	<e0666226-5ebe-462b-9803-b70bd11b9491@isocpp.org>
	<BLUPR03MB455C81E71E81F839F9326C9B81C0@BLUPR03MB455.namprd03.prod.outlook.com>
	<CAGL0aWfGy3JmORCtovX53ogZpgtBdtFb0zgNg7ZYDNixQ-Nx_w@mail.gmail.com>
	<CAFVAEf1+-_Ydmu9hjrJB29g+SsPifxHaDjgNGot3gVwQNoj-=A@mail.gmail.com>
	<54F91983.2020808@stroustrup.com>
	<54F930C8.30609@coverity.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a1132f242b561e80510995501
X-Trace: ger.gmane.org 1425625643 25795 80.91.229.3 (6 Mar 2015 07:07:23 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 6 Mar 2015 07:07:23 +0000 (UTC)
To: Standard Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCUZ5QWKNQIKNJHFU4CRUBDHB5WKA@isocpp.org Fri Mar 06 08:07:23 2015
Return-path: <std-proposals+bncBCUZ5QWKNQIKNJHFU4CRUBDHB5WKA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lb0-f200.google.com ([209.85.217.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCUZ5QWKNQIKNJHFU4CRUBDHB5WKA@isocpp.org>)
	id 1YTmLy-0004k3-Qe
	for gclcip-std-proposals@m.gmane.org; Fri, 06 Mar 2015 08:07:22 +0100
Original-Received: by lbvn10 with SMTP id n10sf1614714lbv.1
        for <gclcip-std-proposals@m.gmane.org>; Thu, 05 Mar 2015 23:07:22 -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: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=abdx+q1NW3FH1jeQNc3rUzXIzsskmCRxjkYFBbqK3L0=;
        b=UJGylPi+eezkuLNGkn0NpSgxLWh4LDiTfRZkVKRwaRP8j3JjZqcrWOyoYX6L9jc0Pl
         tRUPSyHGgSTd8AyD6SCqntvZj5de1mXibgdOdK2pR8GPhePo7S6YEVyjpjvU70y3gNMs
         aRcF87F2UUBg7dyelHHTgNk6AAj5thAvcKzIlq5GYzj/0HIDMeyW8PDOxKO8c2TvglXe
         62fpEkOpcS0rX5PrkYVLOCuyTDVovfzCnzTzzTUtul2FFaFPQgWdBbP5wU7rH9s4MdIp
         4CQSIQTO3jy4ZiG42/JsMGEaeGMwiGfoDcVEqA1bduWdPEFwPORFE4AUcomdvsUff1Om
         TLnQ==
X-Gm-Message-State: ALoCoQm5Qv7eh1n/IQwBsvzWC0gXAiEUZNWZNgA+qX7yKn2B/iNW5GjbCEpcLYtxNQbnyzNMNpqP
X-Received: by 10.112.219.102 with SMTP id pn6mr2013024lbc.12.1425625642222;
        Thu, 05 Mar 2015 23:07:22 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.152.29.225 with SMTP id n1ls36630lah.52.gmail; Thu, 05 Mar
 2015 23:07:17 -0800 (PST)
X-Received: by 10.112.211.200 with SMTP id ne8mr11178240lbc.73.1425625637674;
        Thu, 05 Mar 2015 23:07:17 -0800 (PST)
Original-Received: from mail-la0-x22a.google.com (mail-la0-x22a.google.com. [2a00:1450:4010:c03::22a])
        by mx.google.com with ESMTPS id l6si6306893lab.70.2015.03.05.23.07.17
        for <std-proposals@isocpp.org>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Thu, 05 Mar 2015 23:07:17 -0800 (PST)
Received-SPF: pass (google.com: domain of tvaneerd@gmail.com designates 2a00:1450:4010:c03::22a as permitted sender) client-ip=2a00:1450:4010:c03::22a;
Original-Received: by lamq1 with SMTP id q1so32723777lam.9
        for <std-proposals@isocpp.org>; Thu, 05 Mar 2015 23:07:17 -0800 (PST)
X-Received: by 10.152.9.230 with SMTP id d6mr11308176lab.16.1425625637542;
 Thu, 05 Mar 2015 23:07:17 -0800 (PST)
Original-Received: by 10.112.89.41 with HTTP; Thu, 5 Mar 2015 23:07:17 -0800 (PST)
In-Reply-To: <54F930C8.30609@coverity.com>
X-Original-Sender: tvaneerd@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of tvaneerd@gmail.com designates 2a00:1450:4010:c03::22a as permitted
 sender) smtp.mail=tvaneerd@gmail.com;       dkim=pass header.i=@gmail.com;
       dmarc=pass (p=NONE 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-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://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>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:16805
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/16805>

--001a1132f242b561e80510995501
Content-Type: text/plain; charset=UTF-8

On Thu, Mar 5, 2015 at 11:44 PM, Tom Honermann <thonermann@coverity.com>
wrote:

> We have this for lambdas:
>   auto l = [](auto x) { return x; }
> If we could do (something like) these for generic functions, I would be
> thrilled:
>   auto <>f(auto x) { return x; }
>   auto <>f(Iterator i) { return i; }
>

The terse syntax with just 'auto' doesn't bother me (I think I will learn
to scan for 'auto' params), but if we do choose to have distinctive syntax
to note that it is a template, then I'll make a crazy suggestion: use the
word 'template'

    template void f(auto x) { ... }

Although 'auto' doesn't bother me, as others have mentioned, Concepts give
no hints:

    void f(Number x) { ... }

So either you know your concepts, or you IDE does (and gives them a
different color or something) or maybe that is a reason to use 'template':

    template void f(Number x) { ... }

(and thus use 'template' for the 'auto' case as well)

Tony

-- 

--- 
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

--001a1132f242b561e80510995501
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><div class=3D"gmail_quo=
te">On Thu, Mar 5, 2015 at 11:44 PM, Tom Honermann <span dir=3D"ltr">&lt;<a=
 href=3D"mailto:thonermann@coverity.com" target=3D"_blank">thonermann@cover=
ity.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">We have thi=
s for lambdas:<br>
=C2=A0 auto l =3D [](auto x) { return x; }<br>
If we could do (something like) these for generic functions, I would be thr=
illed:<br>
=C2=A0 auto &lt;&gt;f(auto x) { return x; }<br>
=C2=A0 auto &lt;&gt;f(Iterator i) { return i; }<span class=3D"HOEnZb"><font=
 color=3D"#888888"><br>
</font></span></blockquote><div><br></div><div>The terse syntax with just &=
#39;auto&#39; doesn&#39;t bother me (I think I will learn to scan for &#39;=
auto&#39; params), but if we do choose to have distinctive syntax to note t=
hat it is a template, then I&#39;ll make a crazy suggestion: use the word &=
#39;template&#39;<br><br></div><div>=C2=A0=C2=A0=C2=A0 template void f(auto=
 x) { ... } <br></div></div><br></div><div class=3D"gmail_extra">Although &=
#39;auto&#39; doesn&#39;t bother me, as others have mentioned, Concepts giv=
e no hints:<br><br></div><div class=3D"gmail_extra">=C2=A0=C2=A0=C2=A0 void=
 f(Number x) { ... }<br><br></div><div class=3D"gmail_extra">So either you =
know your concepts, or you IDE does (and gives them a different color or so=
mething) or maybe that is a reason to use &#39;template&#39;:<br><br></div>=
<div class=3D"gmail_extra">=C2=A0=C2=A0=C2=A0 template void f(Number x) { .=
... }<br><br></div><div class=3D"gmail_extra">(and thus use &#39;template&#3=
9; for the &#39;auto&#39; case as well)<br><br></div><div class=3D"gmail_ex=
tra">Tony<br><br></div><div class=3D"gmail_extra"><br><br></div></div>

<p></p>

-- <br />
<br />
--- <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 />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--001a1132f242b561e80510995501--

.
