220 16815 <54F9ED4C.2030108@stroustrup.com> article
Path: news.gmane.org!not-for-mail
From: Bjarne Stroustrup <bjarne@stroustrup.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals,gmane.comp.lang.c++.isocpp.general
Subject: Re: [c++std-core-27226] Re: An implementation of
 enhanced auto deduction and abbreviated template syntax using Clang
Date: Fri, 06 Mar 2015 13:09:16 -0500
Lines: 161
Approved: news@gmane.org
Message-ID: <54F9ED4C.2030108@stroustrup.com>
References: <CABsSThrwV0UCbrmoxoeQUskOjvF2+RX5ctpSq3dPMPxm=t6mww@mail.gmail.com> <e0666226-5ebe-462b-9803-b70bd11b9491@isocpp.org> <BLUPR03MB455C81E71E81F839F9326C9B81C0@BLUPR03MB455.namprd03.prod.outlook.com> <dfb06a45-bb23-496b-bbf8-c31a3f196b72@isocpp.org> <CAJcCCPNSKOeisxU-WnNaz-RquCL_KPjQO3w3tnyi7pCcS2XQeg@mail.gmail.com> <465969eb-2f8b-41bb-91af-d8a9e22985e7@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative;
 boundary="------------040700010608050100060009"
X-Trace: ger.gmane.org 1425665366 29981 80.91.229.3 (6 Mar 2015 18:09:26 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 6 Mar 2015 18:09:26 +0000 (UTC)
Cc: std-proposals@isocpp.org, faisalv@gmail.com, hsutter@microsoft.com
To: c++std-core@accu.org, std-discussion@isocpp.org
Original-X-From: std-proposals+bncBDDP5YUK74KBBTW246TQKGQEA343CTQ@isocpp.org Fri Mar 06 19:09:20 2015
Return-path: <std-proposals+bncBDDP5YUK74KBBTW246TQKGQEA343CTQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pd0-f200.google.com ([209.85.192.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDDP5YUK74KBBTW246TQKGQEA343CTQ@isocpp.org>)
	id 1YTwgZ-0002EC-SD
	for gclcip-std-proposals@m.gmane.org; Fri, 06 Mar 2015 19:09:20 +0100
Original-Received: by pdev10 with SMTP id v10sf84310213pde.0
        for <gclcip-std-proposals@m.gmane.org>; Fri, 06 Mar 2015 10:09:19 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to
         :cc:subject:references:in-reply-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=ncsj4mVxrs5o2n5zZiTmi/Hb7fNb0YH8HJs/cPb3zEA=;
        b=d7S2eftonbqSeCHGt5aG6EdAheWJgdkzgvdUZhstlPU7kyBCb6gtx/xAG1Ae5E7B65
         jes9mDpp3GJzcpOIfxp/UV80Gm80LTQKYQcL+Q2TvDDDNyg7hkuaSnJFsUthZu2EmVvY
         Q9TKtbzf28riHvC8w/l27CGGVFjmfxnaULMhLDPEcke9xhrnIf+agCt6aVYQzQPt/bfO
         qGgPprvEX8j/tTkMzRhm+JQy+vL6Dy4rOliHEgIlhnq4PkDtvEOTepeLahk8BiQ5d5aQ
         6MH+Z8sVDN9iPDqC4vMigfEYsS0O22sjTlbGir3wI5l0PETVI2vxlw0+m/0GNKqFIA6Y
         Dzzw==
X-Gm-Message-State: ALoCoQlFcF7kbu1/ItAmdOhcbMa/DJ681qb+EXmPqWzAVHSroLNCpG55CvDKjbe31Cu8mKqQrxD2
X-Received: by 10.70.96.163 with SMTP id dt3mr10664093pdb.1.1425665358988;
        Fri, 06 Mar 2015 10:09:18 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.109.119 with SMTP id k110ls384999qgf.56.gmail; Fri, 06 Mar
 2015 10:09:18 -0800 (PST)
X-Received: by 10.55.22.32 with SMTP id g32mr26482817qkh.4.1425665358100;
        Fri, 06 Mar 2015 10:09:18 -0800 (PST)
Original-Received: from mail-qg0-f48.google.com (mail-qg0-f48.google.com. [209.85.192.48])
        by mx.google.com with ESMTPS id s30si10012159qge.45.2015.03.06.10.09.18
        for <std-proposals@isocpp.org>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 06 Mar 2015 10:09:18 -0800 (PST)
Received-SPF: none (google.com: bjarne@stroustrup.com does not designate permitted sender hosts) client-ip=209.85.192.48;
Original-Received: by qgdz107 with SMTP id z107so14513652qgd.3
        for <std-proposals@isocpp.org>; Fri, 06 Mar 2015 10:09:18 -0800 (PST)
X-Received: by 10.140.151.13 with SMTP id 13mr21544118qhx.68.1425665357952;
        Fri, 06 Mar 2015 10:09:17 -0800 (PST)
Original-Received: from ?IPv6:2001:18d8:ffff:16:7457:3844:86b:f063? ([2001:18d8:ffff:16:7457:3844:86b:f063])
        by mx.google.com with ESMTPSA id 201sm6220607qhd.11.2015.03.06.10.09.16
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 06 Mar 2015 10:09:16 -0800 (PST)
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0
In-Reply-To: <465969eb-2f8b-41bb-91af-d8a9e22985e7@isocpp.org>
X-Original-Sender: bjarne@stroustrup.com
X-Original-Authentication-Results: mx.google.com;       spf=none (google.com:
 bjarne@stroustrup.com does not designate permitted sender hosts) smtp.mail=bjarne@stroustrup.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:16815 gmane.comp.lang.c++.isocpp.general:5019
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/16815>

This is a multi-part message in MIME format.
--------------040700010608050100060009
Content-Type: text/plain; charset=UTF-8; format=flowed



On 3/6/2015 1:07 PM, Nicol Bolas wrote:
>
>
> On Friday, March 6, 2015 at 12:38:14 PM UTC-5, Jonathan Wakely wrote:
>
>     On 6 March 2015 at 17:21, Nicol Bolas wrote:
>     > Explain to me, the novice C++ programmer, why this thing which
>     doesn't look
>     > like a template suddenly became a template. Explain to me why I
>     have to
>     > implement it in a header, even though it looks exactly like
>     every other
>     > non-template function declaration/definition.
>     >
>     > To the novice C++ programmer, it isn't "all just programming."
>     Whether
>     > something is a template matters.
>
>     Ah, the "won't somebody think of the children" argument.
>
>     The answer to why it suddenly became a template is that its parameter
>     is a concept, not a type. A concept is a family of types.  I don't
>     see
>     why that should be much harder to teach than "a function template
>     is a
>     family of functions" and "a class template is a family of types".
>
>
> If a "family of functions" is so fundamentally different from a 
> regular function that it can't be declared/defined in the same way, 
> why does it look exactly like a regular function? If swapping one 
> identifier for another can so radically change how you go about 
> implementing something, shouldn't it be more syntactically obvious 
> that you've made a major change?
>
> Without the template keyword, it doesn't look like a template. And 
> therefore, it is not immediately obvious that it should be treated as 
> such.
>

People will learn. Learning that
     void f(auto);
implies template is kid's play compared to some things we expect people 
to figure out.

-- 

--- 
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/.

--------------040700010608050100060009
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html>
  <head>
    <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
">
  </head>
  <body bgcolor=3D"#FFFFFF" text=3D"#000000">
    <br>
    <br>
    <div class=3D"moz-cite-prefix">On 3/6/2015 1:07 PM, Nicol Bolas wrote:<=
br>
    </div>
    <blockquote
      cite=3D"mid:465969eb-2f8b-41bb-91af-d8a9e22985e7@isocpp.org"
      type=3D"cite">
      <div dir=3D"ltr"><br>
        <br>
        On Friday, March 6, 2015 at 12:38:14 PM UTC-5, Jonathan Wakely
        wrote:
        <blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left:
          0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">On 6
          March 2015 at 17:21, Nicol Bolas wrote:
          <br>
          &gt; Explain to me, the novice C++ programmer, why this thing
          which doesn't look
          <br>
          &gt; like a template suddenly became a template. Explain to me
          why I have to
          <br>
          &gt; implement it in a header, even though it looks exactly
          like every other
          <br>
          &gt; non-template function declaration/definition.
          <br>
          &gt;
          <br>
          &gt; To the novice C++ programmer, it isn't "all just
          programming." Whether
          <br>
          &gt; something is a template matters.
          <br>
          <br>
          Ah, the "won't somebody think of the children" argument.
          <br>
          <br>
          The answer to why it suddenly became a template is that its
          parameter
          <br>
          is a concept, not a type. A concept is a family of types. =C2=A0I
          don't see
          <br>
          why that should be much harder to teach than "a function
          template is a
          <br>
          family of functions" and "a class template is a family of
          types".
          <br>
        </blockquote>
        <div><br>
          If a "family of functions" is so fundamentally different from
          a regular function that it can't be declared/defined in the
          same way, why does it look exactly like a regular function? If
          swapping one identifier for another can so radically change
          how you go about implementing something, shouldn't it be more
          syntactically obvious that you've made a major change?<br>
          <br>
          Without the template keyword, it doesn't look like a template.
          And therefore, it is not immediately obvious that it should be
          treated as such.</div>
        <br>
      </div>
    </blockquote>
    <br>
    People will learn. Learning that<br>
    =C2=A0=C2=A0=C2=A0 void f(auto);<br>
    implies template is kid's play compared to some things we expect
    people to figure out.<br>
    <br>
  </body>
</html>

<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 />

--------------040700010608050100060009--

.
