220 40968 <4810f3c9-3d28-4ef3-b867-efa821dcdf50@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: mutant.sheepdog@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Can we have beginner friendly new line and
 deprecate std::endl?
Date: Sun, 11 Nov 2018 15:27:30 -0800 (PST)
Lines: 108
Approved: news@gmane.org
Message-ID: <4810f3c9-3d28-4ef3-b867-efa821dcdf50@isocpp.org>
References: <e17189bf-51be-496d-845a-3707a516a210@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1615_1779089983.1541978850302"
X-Trace: blaine.gmane.org 1541978727 3236 195.159.176.226 (11 Nov 2018 23:25:27 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sun, 11 Nov 2018 23:25:27 +0000 (UTC)
Cc: mihailnajdenov@gmail.com
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDV57NMMVALBBY7VULPQKGQETS7WQUA@isocpp.org Mon Nov 12 00:25:23 2018
Return-path: <std-proposals+bncBDV57NMMVALBBY7VULPQKGQETS7WQUA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yb1-f198.google.com ([209.85.219.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDV57NMMVALBBY7VULPQKGQETS7WQUA@isocpp.org>)
	id 1gLz6Y-0000hm-7Z
	for gclcip-std-proposals@m.gmane.org; Mon, 12 Nov 2018 00:25:22 +0100
Original-Received: by mail-yb1-f198.google.com with SMTP id v15-v6sf7099534ybk.1
        for <gclcip-std-proposals@m.gmane.org>; Sun, 11 Nov 2018 15:27:32 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:cc:message-id:in-reply-to:references:subject
         :mime-version:x-original-sender:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=MA9oHtioUj0GyyYn2NQhINaxfdnMITzQyUgC8blTE9M=;
        b=g/MWBKwlakQVmyiGv/NYbj3eQZcXABYVGrNflACC2OHuJE4PZgC1ql2tDX4tYJjNSe
         oGeap39wRVr9P0LzWpnGMcO5p7f59g6mfiZP6jyXvEGQZvQ4y/NY3cvfl5T9AMxG/RRr
         eckib3PZVCMkzldc1oo6PjWhqCLjZccpIoNaLgVt0q+H1gA+z1Bnp95xAoaexRRSXTcj
         mvmotLGVrSOh7bpWEcUx8Ro2AUn1Ucm3aH7o4N9oRIyvaD4CIV35jb9ViUz1N/hlvnpO
         TDHjK3PKXacTnc5OvbVfQiSO2tDjgvGr1BiEbaHIQysjRg9+gtzp0c6pxABPXKtmnyUU
         AndA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to:cc:message-id:in-reply-to:references:subject
         :mime-version:x-original-sender:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=MA9oHtioUj0GyyYn2NQhINaxfdnMITzQyUgC8blTE9M=;
        b=ZTn1ZVLnWVjsHiaeAfwZ7LzibiTOzaf9I4xxJBgfLP6Ppk5nUERyL9RZPa69lepb0Q
         z+mGvbNt8upGvfUMxMXQJVXK5KYfbsWqLeQSVq//xVLejPCA2GHzF17fDo1hs4yvPo2p
         8OR1KUfFXF2OqiL43snMY3xd795c5bUVDNDUlH04md5JwdVzWw9Ep13H1Arh5G+wlrBi
         I7KXEa3qpbs5mAgq/040tr7q7fLmCnxJ9dlWBYuyyAVI3Z4yy8AcljnNZg1gPzbrw6yT
         /pGcENN4jxaBG/CAManZX+hQkAbI0rOdolb3qE21DMyYgIJXicoovsk39E8SaIlqEXHm
         7MLw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:date:from:to:cc:message-id:in-reply-to
         :references:subject:mime-version:x-original-sender:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=MA9oHtioUj0GyyYn2NQhINaxfdnMITzQyUgC8blTE9M=;
        b=XbIgJ+XRuFNXPLdMxCb2x3JOyZ65s30RLDcAEtsmbsutDoYLqcavH+cigCdeIRTfVX
         TTj73S85zzJSp2K8w+dbXrpMLESU/NNdX7ekbe4f09kWYWLLllHzSBlj8cO4+nTWXVwJ
         munXFhT7LHpzwD78FerSOKyVkvZ1gMhlKC1ZvKF3vbhAVCWdyEjcsLJgglJmUFtOiTi0
         yQLj3qvxMjONiIet8ODk5dW3bdI1Q8YWPMZ45z6dZH1Z25JgrZFOh9px6I6U9uuCcFDH
         lx0PLqkpdXNTo5kU0B002IDvqOcRz5MuPuA3ihhcNswr40obrSpdr56Ah8Kc1zsocYyI
         CjrA==
X-Gm-Message-State: AGRZ1gIMYH9oh4T0gw2RWpWPOFWu2CZzuwkyIGuF+ma5qFsDQL+Mc/wj
	NsHgZi2XPrqQ8PGOuBtucYQgUA==
X-Google-Smtp-Source: AJdET5fItuLGbdwqVDfSnaH+eKWZgyLeUtJWmQopDorgYxG1AapnibmHhvt5lDWUVSSsRDN9WpCjLw==
X-Received: by 2002:a25:7d04:: with SMTP id y4-v6mr3430457ybc.16.1541978852361;
        Sun, 11 Nov 2018 15:27:32 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a5b:487:: with SMTP id n7-v6ls2935202ybp.5.gmail; Sun, 11
 Nov 2018 15:27:31 -0800 (PST)
X-Received: by 2002:a25:414:: with SMTP id 20-v6mr174075ybe.4.1541978851079;
        Sun, 11 Nov 2018 15:27:31 -0800 (PST)
In-Reply-To: <e17189bf-51be-496d-845a-3707a516a210@isocpp.org>
X-Original-Sender: Mutant.Sheepdog@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:40968
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/40968>

------=_Part_1615_1779089983.1541978850302
Content-Type: multipart/alternative; 
	boundary="----=_Part_1616_1411622611.1541978850302"

------=_Part_1616_1411622611.1541978850302
Content-Type: text/plain; charset="UTF-8"

I think there's great value in teaching people about escape sequences 
early, it's a useful cross-language concept that they'll run into forever.
I'm also not convinced it's harder to learn than std::endl, In fact I think 
it's much simpler because it's part of the string meaning multi-line 
strings are easy to work with instead of something magical that comes from 
streaming in objects that come from elsewhere in the standard library.

Teaching someone 'put \n where you want a line break' seems easier to me 
than 'if you want a line break, end your string, stream in std::endl, then 
start streaming a new string'. The first says, 'this string has a line 
break in it', the second is 'there are two strings, in the middle we're 
doing the magical end-line operation.

On Friday, 9 November 2018 00:37:54 UTC+11, mihailn...@gmail.com wrote:
>
> Wouldn't it be miles better to instead of un-teaching people from 
> std::endl and advertise '\n' 
> <https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#slio50-avoid-endl> 
> to have equally attractive alternative?
>
> The point is - '\n' is not in any way beginner friendly as it is not an 
> std or build in "command"/object, but some alien symbol (to a new comer) 
> like, literally nothing else - it does not even look a single character.
> Even for a non-beginner, some prefer typing std::endl as it is just simple 
> letters, not rarely used symbols (double colon, is not rarely used a t all) 
>
> Also, if we have a friendly new line alternative we could deprecate endl 
> and teach to new-line-and-flush-if-needed. 
> Without deprecating it, we might add confusion.  
>
>
>
>

-- 
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/4810f3c9-3d28-4ef3-b867-efa821dcdf50%40isocpp.org.

------=_Part_1616_1411622611.1541978850302
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>I think there&#39;s great value in teaching people ab=
out escape sequences early, it&#39;s a useful cross-language concept that t=
hey&#39;ll run into forever.</div><div>I&#39;m also not convinced it&#39;s =
harder to learn than std::endl, In fact I think it&#39;s much simpler becau=
se it&#39;s part of the string meaning multi-line strings are easy to work =
with instead of something magical that comes from streaming in objects that=
 come from elsewhere in the standard library.</div><div><br></div><div>Teac=
hing someone &#39;put \n where you want a line break&#39; seems easier to m=
e than &#39;if you want a line break, end your string, stream in std::endl,=
 then start streaming a new string&#39;. The first says, &#39;this string h=
as a line break in it&#39;, the second is &#39;there are two strings, in th=
e middle we&#39;re doing the magical end-line operation.<br></div><br>On Fr=
iday, 9 November 2018 00:37:54 UTC+11, mihailn...@gmail.com  wrote:<blockqu=
ote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left=
: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">Wouldn&#39;t it be mi=
les better to instead of <a href=3D"https://github.com/isocpp/CppCoreGuidel=
ines/blob/master/CppCoreGuidelines.md#slio50-avoid-endl" target=3D"_blank" =
rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;https://www.google.com/url=
?q\x3dhttps%3A%2F%2Fgithub.com%2Fisocpp%2FCppCoreGuidelines%2Fblob%2Fmaster=
%2FCppCoreGuidelines.md%23slio50-avoid-endl\x26sa\x3dD\x26sntz\x3d1\x26usg\=
x3dAFQjCNHj0c7DLOozJmEULOfU2G9-3_DJOw&#39;;return true;" onclick=3D"this.hr=
ef=3D&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fisocpp=
%2FCppCoreGuidelines%2Fblob%2Fmaster%2FCppCoreGuidelines.md%23slio50-avoid-=
endl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHj0c7DLOozJmEULOfU2G9-3_DJOw&#=
39;;return true;">un-teaching people from std::endl and advertise &#39;\n&#=
39;</a> to have equally attractive alternative?<div><br></div><div>The poin=
t is - &#39;\n&#39; is not in any way beginner friendly as it is not an std=
 or build in &quot;command&quot;/object, but some alien symbol (to a new co=
mer) like, literally nothing else - it does not even look a single characte=
r.</div><div>Even for a non-beginner, some prefer typing std::endl as it is=
 just simple letters, not rarely used symbols (double colon, is not rarely =
used a t all)=C2=A0</div><div><br></div><div>Also, if we have a friendly ne=
w line alternative we could deprecate endl and teach to new-line-and-flush-=
if-needed.=C2=A0</div><div>Without deprecating it, we might add confusion.=
=C2=A0=C2=A0<br><div><br></div><div><br></div><div><br></div></div></div></=
blockquote></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/4810f3c9-3d28-4ef3-b867-efa821dcdf50%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/4810f3c9-3d28-4ef3-b867-efa821dcdf50=
%40isocpp.org</a>.<br />

------=_Part_1616_1411622611.1541978850302--

------=_Part_1615_1779089983.1541978850302--

.
