220 40929 <fff2c6b4-0f49-4151-bcf0-094e273cafa5@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: "T. C." <rs2740@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Can we have beginner friendly new line and
 deprecate std::endl?
Date: Thu, 8 Nov 2018 14:30:23 -0800 (PST)
Lines: 179
Approved: news@gmane.org
Message-ID: <fff2c6b4-0f49-4151-bcf0-094e273cafa5@isocpp.org>
References: <e17189bf-51be-496d-845a-3707a516a210@isocpp.org>
 <CAMmfjbOkdN63EON+hrCJWj94n48vtVvMfUjzeau5KmPWSpwkow@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_722_3665461.1541716223231"
X-Trace: blaine.gmane.org 1541716101 1595 195.159.176.226 (8 Nov 2018 22:28:21 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 8 Nov 2018 22:28:21 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCQ43G7NQIIRBAHSSLPQKGQEETORDPA@isocpp.org Thu Nov 08 23:28:17 2018
Return-path: <std-proposals+bncBCQ43G7NQIIRBAHSSLPQKGQEETORDPA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yb1-f200.google.com ([209.85.219.200])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCQ43G7NQIIRBAHSSLPQKGQEETORDPA@isocpp.org>)
	id 1gKsmc-0000EF-La
	for gclcip-std-proposals@m.gmane.org; Thu, 08 Nov 2018 23:28:14 +0100
Original-Received: by mail-yb1-f200.google.com with SMTP id t60-v6sf16632593ybi.4
        for <gclcip-std-proposals@m.gmane.org>; Thu, 08 Nov 2018 14:30:25 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to: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=M/ArYYc9ucv7z22dZlVKFPJYT0LvYD822Wxk/K2kM4g=;
        b=jnWqjUxUVsRKqB0VlV9srgIYRBZwi0HojrBDYxlOxjfynIAI0E9ctc44wsjBzRdavF
         l2H3JhTr6QfRrI3EWfQ/8rHI2xeJPpzkVVoT3+z2s/gBntJVCzZWVob4SW/uvpJ5C8L2
         m1ZY0Ms2fLyd73s8fdiow+2GZlb8JbwsGg4ABZLdSPCy+nWgD85gHcslIeG2XCXISc/c
         P+kRiERU7gL1rmFnBYcPv4LnRL6FOlaq3bb38vv/286jM0m8pYcJm+fzlZvbMYF+f8TX
         +wCn3hnyQidmyN6X9CIdDJdQHtcACisEbcKU6Clrd4mChx50Blc2dgqrhyllz5pEckd5
         HACA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to: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=M/ArYYc9ucv7z22dZlVKFPJYT0LvYD822Wxk/K2kM4g=;
        b=L2OFCXeP+a8oQ0JK68i/O8WgLKqi4TevcIk4QYKPi716XG5a+BExR4VEyX5zJKcyWA
         aVnSyXFLLvI3GMhO+5OxqR5bwfcnlKJX4AeHAC+JJZ/tf1QJaq2oHq96180eVKx1qyQ/
         kfgfi8bF3Aa/8zFrL57Y9RRcqHCXzupCfus3YzOFL+FHtBqWYCGBZr3kACTSWUDjHWn0
         0tIkSRa3OpEVtttO/rnIaPkFG+2syv8mxEdf9P6K0NzP1xqTVQJD9gHlYTkEr0pDc324
         FK7i+RqyFFhRkouPRabSyuXsd8ifznMOE81BIYRrUmNEUYM8i2uu6kDaZ0rOj0tsWbSb
         nmaw==
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: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=M/ArYYc9ucv7z22dZlVKFPJYT0LvYD822Wxk/K2kM4g=;
        b=k5Sa/YrzQrVQ4u1nsUBDOQYU/EQRq5l8OG0pORmg0sKa/U0CNsUoPUO6TpfAyfawsa
         juqv1d5isj7jqBSYR4fgt7BCmej/Z/ILXKjPp5Ol1aXYD0ux4OcWFtDUPrOeBYDnGoFG
         ynYwELix44hDztvP979YeDLpJZt+R4z4w0n5f+I7ROo16dS1/+86WpIcQi6OBT8Rsgpg
         Uoh1DRQWcIAkvEfNrGufDCREG8HWRe/koWh/ajpFwNWdwjUcrPVDb9JqyoOafHaTR2PD
         Jrch9CWarvAy8UsOj06v8rpKjA2PwsUcKp4myqVzaHMLbmPQfjKUYqsmKyQf1y8uqrCe
         FvdA==
X-Gm-Message-State: AGRZ1gLFr7vilX/9efLDtqZPnVVcgEsSTryneUTc0pTRWGzUW/HD4Sgv
	kwGdC9PWHi2yY1KWVHgkqnmo4Q==
X-Google-Smtp-Source: AJdET5edqDhUHjxJSX/tkXcYx0uuc2qjFZCfqjAm9BsrHlRjcgC46zinqJuxyrsqPzz+q+gP3uHnhA==
X-Received: by 2002:a25:b89:: with SMTP id 131-v6mr3221236ybl.23.1541716224991;
        Thu, 08 Nov 2018 14:30:24 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a5b:446:: with SMTP id s6-v6ls1382912ybp.3.gmail; Thu, 08
 Nov 2018 14:30:24 -0800 (PST)
X-Received: by 2002:a25:f207:: with SMTP id i7-v6mr66207ybe.3.1541716224107;
        Thu, 08 Nov 2018 14:30:24 -0800 (PST)
In-Reply-To: <CAMmfjbOkdN63EON+hrCJWj94n48vtVvMfUjzeau5KmPWSpwkow@mail.gmail.com>
X-Original-Sender: rs2740@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:40929
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/40929>

------=_Part_722_3665461.1541716223231
Content-Type: multipart/alternative; 
	boundary="----=_Part_723_2077986292.1541716223231"

------=_Part_723_2077986292.1541716223231
Content-Type: text/plain; charset="UTF-8"



On Thursday, November 8, 2018 at 5:08:10 PM UTC-5, Brian Bi wrote:
>
> On Thu, Nov 8, 2018 at 7:37 AM <mihailn...@gmail.com <javascript:>> 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) 
>>
>
> I think the reason why novices use std::endl is that they're under the 
> impression (no doubt perpetuated by incompetent educators) that std::endl 
> is portable whereas '\n' isn't.
>
> Also, I think adding some hypothetical new "std::newline" constant in an 
> attempt to "seduce" novices does them a disservice by making them waste 
> keystrokes and tempting them to use "using namespace std" to save a few.
>
> In other words, teaching people to use '\n' really is the best solution.
>

I can see a manipulator that does endl-without-the-flush to be marginally 
useful. It would be different from << '\n' in that it performs unformatted 
output, i.e., no padding.

I'm not convinced that it's worth standardizing.
 

>  
>
>>
>> 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-proposal...@isocpp.org <javascript:>.
>> To post to this group, send email to std-pr...@isocpp.org <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/e17189bf-51be-496d-845a-3707a516a210%40isocpp.org 
>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/e17189bf-51be-496d-845a-3707a516a210%40isocpp.org?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> -- 
> *Brian Bi*
>

-- 
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/fff2c6b4-0f49-4151-bcf0-094e273cafa5%40isocpp.org.

------=_Part_723_2077986292.1541716223231
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Thursday, November 8, 2018 at 5:08:10 PM UTC-5,=
 Brian Bi wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin=
-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"lt=
r"><div class=3D"gmail_quote"><div dir=3D"ltr">On Thu, Nov 8, 2018 at 7:37 =
AM &lt;<a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"N=
OhUIZqVBAAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;javascript:&#=
39;;return true;" onclick=3D"this.href=3D&#39;javascript:&#39;;return true;=
">mihailn...@gmail.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_q=
uote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1e=
x"><div dir=3D"ltr">Wouldn&#39;t it be miles better to instead of <a href=
=3D"https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelin=
es.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%2=
Fisocpp%2FCppCoreGuidelines%2Fblob%2Fmaster%2FCppCoreGuidelines.md%23slio50=
-avoid-endl\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHj0c7DLOozJmEULOfU2G9-3=
_DJOw&#39;;return true;" onclick=3D"this.href=3D&#39;https://www.google.com=
/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fisocpp%2FCppCoreGuidelines%2Fblob%2Fma=
ster%2FCppCoreGuidelines.md%23slio50-avoid-endl\x26sa\x3dD\x26sntz\x3d1\x26=
usg\x3dAFQjCNHj0c7DLOozJmEULOfU2G9-3_DJOw&#39;;return true;">un-teaching pe=
ople from std::endl and advertise &#39;\n&#39;</a> to have equally attracti=
ve alternative?<div><br></div><div>The point is - &#39;\n&#39; is not in an=
y way beginner friendly as it is not an std or build in &quot;command&quot;=
/object, but some alien symbol (to a new comer) like, literally nothing els=
e - it does not even look a single character.</div><div>Even for a non-begi=
nner, 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><=
/blockquote><div><br></div><div>I think the reason why novices use std::end=
l is that they&#39;re under the impression (no doubt perpetuated by incompe=
tent educators) that std::endl is portable whereas &#39;\n&#39; isn&#39;t.<=
/div><div><br></div><div>Also, I think adding some hypothetical new &quot;s=
td::newline&quot; constant in an attempt to &quot;seduce&quot; novices does=
 them a disservice by making them waste keystrokes and tempting them to use=
 &quot;using namespace std&quot; to save a few.</div><div><br></div><div>In=
 other words, teaching people to use &#39;\n&#39; really is the best soluti=
on.</div></div></div></blockquote><div><br></div><div>I can see a manipulat=
or that does endl-without-the-flush to be marginally useful. It would be di=
fferent from &lt;&lt; &#39;\n&#39; in that it performs unformatted output, =
i.e., no padding.</div><div><br></div><div>I&#39;m not convinced that it&#3=
9;s worth standardizing.</div><div>=C2=A0</div><blockquote class=3D"gmail_q=
uote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;pad=
ding-left: 1ex;"><div dir=3D"ltr"><div class=3D"gmail_quote"><div>=C2=A0</d=
iv><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><br></div><div>Also=
, if we have a friendly new line alternative we could deprecate endl and te=
ach 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>

<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"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"=
NOhUIZqVBAAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;javascript:&=
#39;;return true;" onclick=3D"this.href=3D&#39;javascript:&#39;;return true=
;">std-proposal...@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"javascript:" target=3D"_bla=
nk" gdf-obfuscated-mailto=3D"NOhUIZqVBAAJ" rel=3D"nofollow" onmousedown=3D"=
this.href=3D&#39;javascript:&#39;;return true;" onclick=3D"this.href=3D&#39=
;javascript:&#39;;return true;">std-pr...@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/e17189bf-51be-496d-845a-3707a516a210%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank" =
rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;https://groups.google.com/=
a/isocpp.org/d/msgid/std-proposals/e17189bf-51be-496d-845a-3707a516a210%40i=
socpp.org?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" on=
click=3D"this.href=3D&#39;https://groups.google.com/a/isocpp.org/d/msgid/st=
d-proposals/e17189bf-51be-496d-845a-3707a516a210%40isocpp.org?utm_medium\x3=
demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/e17189bf-51be-496d-<wbr>845a-=
3707a516a210%40isocpp.org</a><wbr>.<br>
</blockquote></div><br clear=3D"all"><div><br></div>-- <br><div dir=3D"ltr"=
><div dir=3D"ltr"><div><div dir=3D"ltr"><font color=3D"#c0c0c0"><i>Brian Bi=
</i></font><br><div></div><div></div><div></div></div></div></div></div></d=
iv>
</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/fff2c6b4-0f49-4151-bcf0-094e273cafa5%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/fff2c6b4-0f49-4151-bcf0-094e273cafa5=
%40isocpp.org</a>.<br />

------=_Part_723_2077986292.1541716223231--

------=_Part_722_3665461.1541716223231--

.
