220 40926 <CAMmfjbOkdN63EON+hrCJWj94n48vtVvMfUjzeau5KmPWSpwkow@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Brian Bi <bbi5291@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 16:07:55 -0600
Lines: 128
Approved: news@gmane.org
Message-ID: <CAMmfjbOkdN63EON+hrCJWj94n48vtVvMfUjzeau5KmPWSpwkow@mail.gmail.com>
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/alternative; boundary="0000000000003ab7b6057a2e78b4"
X-Trace: blaine.gmane.org 1541714763 8480 195.159.176.226 (8 Nov 2018 22:06:03 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 8 Nov 2018 22:06:03 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDS5ZX5VU4NBBSPHSLPQKGQEI4SYMYA@isocpp.org Thu Nov 08 23:05:59 2018
Return-path: <std-proposals+bncBDS5ZX5VU4NBBSPHSLPQKGQEI4SYMYA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ed1-f71.google.com ([209.85.208.71])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDS5ZX5VU4NBBSPHSLPQKGQEI4SYMYA@isocpp.org>)
	id 1gKsR5-00021e-9t
	for gclcip-std-proposals@m.gmane.org; Thu, 08 Nov 2018 23:05:59 +0100
Original-Received: by mail-ed1-f71.google.com with SMTP id x1-v6sf116675edh.8
        for <gclcip-std-proposals@m.gmane.org>; Thu, 08 Nov 2018 14:08:10 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1541714889; cv=pass;
        d=google.com; s=arc-20160816;
        b=ldG1iV5jUggT1vSMS1XXil4BUJD0r0UeP48rGrOqdoBoQmsgmskwIpUG2AaR5cGKiU
         PxmH/kTiFAD8YRGwyaN47rE2nFeufWtuY79pKdvOZV5+GIJKAW09NBhOXftzpoQ1Zz6a
         x9peZtqDzJu446TyhUmUyKERIPEnEelBYg6vQDwuHZG0Xz157xZ6yF7b/xt/btdarPFy
         fbaGAVQs5WRqlsow1KseeXodQHfkChcJLVUSTpxvZZ1v5TX76EwyuDcdMc/OFyR6Z4rF
         pddsGNlbbnR1NTPMNjxpTuu0leRWXtGbslM9efbS3AfO0cfd4EOrqx9FchFi1XqOJ4ED
         sjhg==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date
         :from:in-reply-to:references:mime-version:dkim-signature;
        bh=yw67+/7ZyB6VMSSwFPf/h6bCZiM5eRdJm0PhNTYjdn4=;
        b=ZPYA0dwcGQDaN8h9wyPInYMczpDboJx1iJn/iIrKUzERct9DP45bP9KiNWtvpDSEJA
         o+kV5oppBheubZ7vdJ8HlqNADuA0K+bRmnMGXgo/ycJSUtLAbfWlndYhKE8dBw+KCvPB
         mmFBdUcuYq1jh1twKFS8RDDI0x7EgEGyHCf+OmQkuTXLtUzO27W4leClRXYo/gLoYfLK
         FKX72e/GWBsr9gsDHBI27+H/kfLYIqNDByVSv/iQ0JA7iXSSwXknmOfttJkjG38x37k2
         LBKI6hgV++IkeCJpuv2LM+7Y5d7FI4SSwOL6usgBxxlgWI5OEk4ZDd8G2UK9CqQ96dAt
         lGCw==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=WXk9Bthy;
       spf=pass (google.com: domain of bbi5291@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=bbi5291@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:references:in-reply-to:from:date:message-id:subject:to
         :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=yw67+/7ZyB6VMSSwFPf/h6bCZiM5eRdJm0PhNTYjdn4=;
        b=SI+HPg5ci2QfzTzflM/LB6VeyaKGwBbnB8IQ0RYzxo9j1P3EQ9dVeIciIglP5lICBn
         eqKZ2OYNgJkTCtT6pOQ9h4X2ACtD6JoQE7GYZ1u9ao9SEzja+bKBOaqV25ri38dZZWU5
         Bj2PkhB3RmnVcUun8SyUsiGcEio8QEunigajDIkpFUcUJpRRwJZ8rKShhIpIdNSEcCKG
         E9hzyokDjJRp81+2SZJhVAP79fLtdw24XFeBJGdLi7UPhbVaB/k0e8M95zPVXB0gx50f
         1Q/7rwB+YsTQWp5dLEo4fz0mAkHG3Vvr+Rn3scfEmWy/h1J6aUbhotw1vHrASBZEKZnh
         t6+w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:references:in-reply-to:from:date
         :message-id:subject:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=yw67+/7ZyB6VMSSwFPf/h6bCZiM5eRdJm0PhNTYjdn4=;
        b=W98jHXCifupx7cgZXf7mQyeYRvUQY12OBfsMrm0TCqnQemxOYzFgtnE5CjknRIDN+D
         aC3VZdLiDFrvnhvveobhlxRFO+XoWP/KF3FpWmapqM+TmCPsivk6iaGGqa5qYQQlSoKp
         8jZS311nBTvkFRonfmReZMbC9hTE11fRO9NR3jO+hpHVF3HUOf2/4DGlrRrY7nUrHXxh
         QsSCLAinVF59XoYrDL09UBcNLQ3CbUclegNVbIEv9P2YmDBR9YyWS1LmBQ0rmhYjUyFn
         VXgdNK84rmPhf5c48X5ookmvTdozhnHXRs3bz6zdnf4bJ/iCAT3BTXK/bQl6rNl/rI9T
         ff/Q==
X-Gm-Message-State: AGRZ1gLPsOsWqnus5H3hLCdEddfRDtk3jPy2WZ2+YtNnjfxOdNWjthWU
	7P6kMbHb4LeKDxB8RjvssMeExA==
X-Google-Smtp-Source: AJdET5fZlMb9rpXcvPpZf8NK1JOfYQcafHtoiq5VVNu71vfRbRMSFBCSbQ4uMu5QTVx37HWp4l52DQ==
X-Received: by 2002:a17:906:6ace:: with SMTP id q14-v6mr22949ejs.7.1541714889834;
        Thu, 08 Nov 2018 14:08:09 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a50:b7b1:: with SMTP id h46-v6ls19741ede.14.gmail; Thu, 08
 Nov 2018 14:08:08 -0800 (PST)
X-Received: by 2002:a50:c19a:: with SMTP id m26-v6mr161114edf.82.1541714888607;
        Thu, 08 Nov 2018 14:08:08 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1541714888; cv=none;
        d=google.com; s=arc-20160816;
        b=WHuKBcWdMEnzhCOZBlAfqSnHrVEnrbPrhLKyD1uRaTJdHDa7x7860x4y6sopMx5Vyf
         D6o84UYoxvqXqRyvH79FiRgPTW6ZIrJKEe3Cu8Y00/mEOjDOgi6fYfL86NYBT9TNA9CU
         fQYVXAemgfkKUh9HWnluaMdke6C9dfAI+MyE3u/nmhXyB7JNYZJ3kglnIWdYNQ50kkWu
         xq15jaUVYEjom7QEIlfytHtq7pm6JLiv4EVCNDW/kR28S2w6T/O0jzd25NNOwYlhxyo5
         hzeNr55qmG9fd7qh/l/RSQJSvhb6KEeXQXpx3cGubVrWGcwMmM5/ZA6FzaYA6KuP+Z7Q
         oxmw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:in-reply-to:references:mime-version
         :dkim-signature;
        bh=+uXwn2sitX+lFXpDmcatkNAUxKRcu+dTKjlrDtqbFk0=;
        b=dP/E5LSnV+YVSteFkAn/MrarfDWnUQGcppc7QbMIxeM3Go4bSX/QmPKjLwS+JLg1Sd
         j3f10Xh0nVd8yTjyeRKfuIsq97/qSZj954pvqEUS0WmkXp+tA2bxU7V1jGD7JdIG/0o4
         lGFsp/pxqyB9SFxKMBoVl72J4uDDmNaV1SEH/U4XR1WdMg/9G2YH2F0yrffNk8GQyWe2
         ntrtVSnydivtD1ObGaPD6dqkArq+v1VmeoqXdCWUCpx6X2y+SuOJQCzTYhKzWAQNQhRd
         ctyHIsZdljNMFxjd1yBQcvl4UES02SZJ+MQDJ8eeshPtHQScwlOb1jcO8uIgYHzei61w
         M2UQ==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=WXk9Bthy;
       spf=pass (google.com: domain of bbi5291@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=bbi5291@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Original-Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
        by mx.google.com with SMTPS id u13-v6sor1494693ejt.19.2018.11.08.14.08.08
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Thu, 08 Nov 2018 14:08:08 -0800 (PST)
Received-SPF: pass (google.com: domain of bbi5291@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 2002:a17:906:46c7:: with SMTP id k7-v6mr106330ejs.71.1541714887749;
 Thu, 08 Nov 2018 14:08:07 -0800 (PST)
In-Reply-To: <e17189bf-51be-496d-845a-3707a516a210@isocpp.org>
X-Original-Sender: bbi5291@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=WXk9Bthy;       spf=pass
 (google.com: domain of bbi5291@gmail.com designates 209.85.220.41 as
 permitted sender) smtp.mailfrom=bbi5291@gmail.com;       dmarc=pass (p=NONE
 sp=QUARANTINE 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-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:40926
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/40926>

--0000000000003ab7b6057a2e78b4
Content-Type: text/plain; charset="UTF-8"

On Thu, Nov 8, 2018 at 7:37 AM <mihailnajdenov@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)
>

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.


>
> 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/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/CAMmfjbOkdN63EON%2BhrCJWj94n48vtVvMfUjzeau5KmPWSpwkow%40mail.gmail.com.

--0000000000003ab7b6057a2e78b4
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_quote"><div dir=3D"ltr">On Thu, Nov 8,=
 2018 at 7:37 AM &lt;<a href=3D"mailto:mihailnajdenov@gmail.com">mihailnajd=
enov@gmail.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" st=
yle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div =
dir=3D"ltr">Wouldn&#39;t it be miles better to instead of <a href=3D"https:=
//github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#slio=
50-avoid-endl" target=3D"_blank">un-teaching people from std::endl and adve=
rtise &#39;\n&#39;</a> to have equally attractive alternative?<div><br></di=
v><div>The point is - &#39;\n&#39; is not in any way beginner friendly as i=
t is not an std or build in &quot;command&quot;/object, but some alien symb=
ol (to a new comer) like, literally nothing else - it does not even look a =
single character.</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></blockquote><div><br></div><=
div>I think the reason why novices use std::endl is that they&#39;re under =
the impression (no doubt perpetuated by incompetent educators) that std::en=
dl is portable whereas &#39;\n&#39; isn&#39;t.</div><div><br></div><div>Als=
o, I think adding some hypothetical new &quot;std::newline&quot; constant i=
n 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&q=
uot; to save a few.</div><div><br></div><div>In other words, teaching peopl=
e to use &#39;\n&#39; really is the best solution.</div><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"><div dir=3D"ltr"><div><br></div><div>Also, if =
we have a friendly new line alternative we could deprecate endl and teach t=
o 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"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">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/e17189bf-51be-496d-845a-3707a516a210%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/e17189bf-51be-=
496d-845a-3707a516a210%40isocpp.org</a>.<br>
</blockquote></div><br clear=3D"all"><div><br></div>-- <br><div dir=3D"ltr"=
 class=3D"gmail_signature" data-smartmail=3D"gmail_signature"><div dir=3D"l=
tr"><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></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/CAMmfjbOkdN63EON%2BhrCJWj94n48vtVvMfU=
jzeau5KmPWSpwkow%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAMmfjbOkdN63EO=
N%2BhrCJWj94n48vtVvMfUjzeau5KmPWSpwkow%40mail.gmail.com</a>.<br />

--0000000000003ab7b6057a2e78b4--

.
