220 40938 <CALmDwq1wq9pKv3Esy4AXepnSMotfXTwoJ3BUQwHdmJza2gWP_Q@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Nicolas Lesser <blitzrakete@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Can we have beginner friendly new line and
 deprecate std::endl?
Date: Sat, 10 Nov 2018 07:28:24 -0800
Lines: 329
Approved: news@gmane.org
Message-ID: <CALmDwq1wq9pKv3Esy4AXepnSMotfXTwoJ3BUQwHdmJza2gWP_Q@mail.gmail.com>
References: <e17189bf-51be-496d-845a-3707a516a210@isocpp.org>
 <CAMmfjbOkdN63EON+hrCJWj94n48vtVvMfUjzeau5KmPWSpwkow@mail.gmail.com>
 <CAHSYqdYYZjeHHbRZ5bcHLYVsWfspwCeQ8oxEDRbuJ8dqAtsX5A@mail.gmail.com>
 <AB167E1A-FA59-4B72-A9C2-1624D1B56614@hsr.ch> <b49f4c85-816b-4b35-851d-407061a8ef9f@isocpp.org>
 <CAMmfjbOjpJvBWEke1z0XXnHXhjtEO_otNN5-jayGPwe3RHO0Rw@mail.gmail.com> <7da1f33f-c2c1-482f-8fc2-c23a9767a5ec@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="00000000000008cec8057a511f7d"
X-Trace: blaine.gmane.org 1541863591 17838 195.159.176.226 (10 Nov 2018 15:26:31 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sat, 10 Nov 2018 15:26:31 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDXKNLEUTADRBI7STPPQKGQEYMXYKQA@isocpp.org Sat Nov 10 16:26:27 2018
Return-path: <std-proposals+bncBDXKNLEUTADRBI7STPPQKGQEYMXYKQA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oi1-f200.google.com ([209.85.167.200])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDXKNLEUTADRBI7STPPQKGQEYMXYKQA@isocpp.org>)
	id 1gLV9W-0004VH-TD
	for gclcip-std-proposals@m.gmane.org; Sat, 10 Nov 2018 16:26:27 +0100
Original-Received: by mail-oi1-f200.google.com with SMTP id y73-v6sf2847790oie.13
        for <gclcip-std-proposals@m.gmane.org>; Sat, 10 Nov 2018 07:28:37 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1541863717; cv=pass;
        d=google.com; s=arc-20160816;
        b=CHjU3MfudyPAGOn99CUZd8hzIyZgH6K6sWgAeeaMl5gwT5tHVprMt/E8ReD/MNcWiz
         TfPxenBRECtBJq1+Sqpoo7qWTZuPFfiYWugOsqLD1gbciwout+85h2+1fmB7iyTegFBv
         7NbVD4nc1TKgVQqHNoc2W30xhAl44q5uKR+WQfwYKbZyVwP5rI36BqCCCBHYhH+VGXGo
         GrODyeLab/ChoVeEDUrBWRkZc3COPFIhm+yw4t9KIpi5xyJAFdn4hRrCqn6rEgJDtbiI
         LbQDsjIQu2y5bpOlaQM637Pg6wVTrcBNPEI2ZX1NbRNyKLI/FkPl7JE1tob4W+FxRYgo
         WB2g==
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=7fqaoLCfBWnQ4iXIS+05mUpGGMEoKlu4FXWETY9rclk=;
        b=TaUYS/ORDqLd/8iMiEIN2GZWRFZDSkX0DUvKQb125ntF2Aq8kIvmdRjGKEViXBpvu1
         POTZc60M0J1OzeeAkAu8UwbdtopYZnMp/Sr271VoMUwjdsrobtazNQyOxuoEvBn5oTwy
         rGUAk59A6Fsvow0tJ1fER2dXtDMlXR+IY4GrcKr+pkHeEN3VLL+aOr4S2IbSs4mvfkLu
         u6RMMVhsMKiSieQe1o28EpdXGLRpfgAaow6Z5nkUIqgb1N+hKMgLsRw9Fba7/Q28CYN3
         Qd+iAgVFS/aY2dZl+E73MnUCZTenzeA2Y02c0xp44evSSKvd2N0T4CoAIGxthrsCscFf
         ae/Q==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=IYnlYdIY;
       spf=pass (google.com: domain of blitzrakete@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=blitzrakete@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=7fqaoLCfBWnQ4iXIS+05mUpGGMEoKlu4FXWETY9rclk=;
        b=xIimLi+miGZxOTaz4ti4K5XQP5rJDYL2AfmKinEyQxYkjBJ4CkIw6ZmRBjHqpdTD1z
         YsI4tZYsH0ZEgDQDi7TeY0tecFZHarYAo3B+rtC5PKgfykZ6iJNC7Jxnt+V4rF1fQQoe
         QmY/32lOY21giAIVlFpKiukzIx0R18L1mrXsmXuZC5f24+TksnVmAKO7H385nGmwzVDf
         yxcCCaR+nrez1/i4318mQbV0dmxrYuRclH+6mTfGT641eprtsd33cjtvK1brOjnfI3Kc
         iKmZpCkI+n1gKuPz9ZOo8aGqforacoOqwJtaKF7gvY0sopflf9zAnhMbO7y89YLx+0jF
         4fXA==
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=7fqaoLCfBWnQ4iXIS+05mUpGGMEoKlu4FXWETY9rclk=;
        b=RpAMHnR3FqgN+NcPfRSovdu5znUqcbNzcqbc8zP/I3E4eoHG2RMMJEEHLCOEh/UKeO
         M4Y6Y180lULCMYckOpvgNr1RDZ69aq/25QLm9ol9lvUPsZQAzCPlnJ4jcnEcP7qT6Z90
         w1GAtYVcV3sNPpFRcVJp1+WZKqVfGU7QtmyGsCuolhBciZjdlVGXJ0ux4MWsr9C+TsCd
         IOgrKoRqVvFXJVNzPh3yUdrLZWOhApv61tZi/fds/R28igWbafENZC+OHsDNydF0bHS4
         o6CRosL4z7BG5d22FcDNA3cwVV7evmoo30lRR25i2hNpzlMbrA2K0SstoW/cCMpC1LFH
         2yjw==
X-Gm-Message-State: AGRZ1gKgfG91eo+JoUkKdx1yTrBtecd/gwOsQVbAeiXJjmcCELiDpuwC
	N3mPQ5InkAxyhIJ9ElHdYvOgtQ==
X-Google-Smtp-Source: AJdET5fJbbZenZbVOxEoOkypqJiL4XDHHE2PUM3rZLSzDfIxE1wgzta+migll0wkPmbMNeKZ6Ktujw==
X-Received: by 2002:aca:ac86:: with SMTP id v128-v6mr9502828oie.4.1541863717057;
        Sat, 10 Nov 2018 07:28:37 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:aca:c154:: with SMTP id r81-v6ls2032994oif.12.gmail; Sat, 10
 Nov 2018 07:28:35 -0800 (PST)
X-Received: by 2002:aca:ba54:: with SMTP id k81-v6mr7790366oif.177.1541863715745;
        Sat, 10 Nov 2018 07:28:35 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1541863715; cv=none;
        d=google.com; s=arc-20160816;
        b=Om+6DJRHr9JN+mpxB8+6AsiLUsLeK6bQvZ7E0ggAIrTq2a7pQ0Th+HKqXd5dhpqMRR
         6u9CvsOnwCB/xZoHxZzEeVz2icdeDWiLfP4soVOZlO3PSL8r3sSWKNJWrG2TbQTzMo8N
         WMlZY8qZ9daWmUibnbD07LhThlLX9NjU31VaTOmwfGJMx0ANXP8D0hrkqhq3Q2y4Ux+6
         mksIe4U4U3oC/+H+w3Q6T1iKMTYoDA5qEq+4faSyX3rbu6wFyyQAOmViS3+mKwf8zSTs
         L4xFBFmnvwt/lrSZYnvM4tz07YtOXxHauBvGpHun1ZB3L8iHMhPS4wsKJlpoXKCDG8tb
         /88w==
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=IN9JrUtOiOq2U5hm1BWX6ja9WxXB4oVJVbZ4DUQcXfI=;
        b=g7D5et0K0CUz0aNdPDWWQLMl3OSGSOBA8jlgKdFaDFP2qOwYkhUb9Gf0WG4ePn7jxT
         RNbTdL1/DxPjZytGEtPwCkU5Wo46fsZ8cL4DVm1+eMbS46gnvXl45PgGxsrnZobSDErJ
         6chbbtjr2tKiJxy6HatZWiQFcn0VrPJP6U5Wv+k916TauG+IO6pb/a3NWmspJCpsQxXt
         8JU2FDVL/6w4anQrKuslss/YaU84XFf1o1qIfZbRpgfWVEafyXA5JQYP34ofw+L6r9ll
         hu1NueEKFiXqj4LQFgkWzLXFTwOKgvX4ReWSNcnmgq1ERsIhyL2YhDYuyr6u824o4NwW
         bNpA==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=IYnlYdIY;
       spf=pass (google.com: domain of blitzrakete@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=blitzrakete@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 q125-v6sor4868062oia.48.2018.11.10.07.28.35
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Sat, 10 Nov 2018 07:28:35 -0800 (PST)
Received-SPF: pass (google.com: domain of blitzrakete@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 2002:aca:d4d7:: with SMTP id l206-v6mr7530862oig.307.1541863715162;
 Sat, 10 Nov 2018 07:28:35 -0800 (PST)
In-Reply-To: <7da1f33f-c2c1-482f-8fc2-c23a9767a5ec@isocpp.org>
X-Original-Sender: blitzrakete@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=IYnlYdIY;       spf=pass
 (google.com: domain of blitzrakete@gmail.com designates 209.85.220.41 as
 permitted sender) smtp.mailfrom=blitzrakete@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:40938
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/40938>

--00000000000008cec8057a511f7d
Content-Type: text/plain; charset="UTF-8"

You're going to have a hard time because the committee doesn't like
iostreams and plans on replacing them with something else.

And I don't really see a problem with \n. Sure, it's a bit old-school, but
it's clear and almost every language uses it. If you're programming you'll
going to have to learn \n eventually.

On Sat, Nov 10, 2018, 7:24 AM <mihailnajdenov@gmail.com wrote:

>
>
> On Friday, November 9, 2018 at 6:50:59 PM UTC+2, Brian Bi wrote:
>>
>>
>>
>> On Fri, Nov 9, 2018 at 3:19 AM <mihailn...@gmail.com> wrote:
>>
>>> There are multiple problems with '\n'
>>>
>>> First - it is ultimately C ("way")
>>>
>> This mailing list is about C++, not Java, Rust, Swift, etc.
>> This is not an argument.
>>
>
> There is some sort of miscommunication.
> The fact there no C++ way to insert a new line (only a UNIX special
> character way) is what I state an issue,
> considering the rest of the API
>
>
>>
>> Second, when we introduce simple output to beginners, for which cout is
>>> actually good because of overloading,
>>> when using '\n' we have to introduce additional topics
>>>  - the fact a char can be more the one, well, character
>>>  - special magic characters
>>> We also create asymmetry b/w what is used to start the output std::cout
>>> (an object), to modify it (hex) and what is used to end it ("magic").
>>>
>>
>
>> What do you mean, "what is used to end it"? A semicolon?
>>
>
> std::cout     //< start
>   << 12.f
>   << ' '
>   << std::hex //< modify
>   << 255
>   << '\n';    //< finish (magic)
>
> Note that printf (and other languages) already use special characters to
> modify the output, so having an '\n' is not abrupt.
>
> But C++ streams are different, having to spell out a special character is
> odd and unintuitive for a beginner and a design deficiency in general.
>
>
>
>>
>>>
>>> This screams some design flaw - we should be able to insert a new lines
>>> the same way we modify the stream!
>>>
>> Yes, the way to do that is with '\n'.
>>
>>
>>>
>>> On its own std::endl has the flaw that it does not obey the "do one
>>> thing" rule.
>>> Once we deprecate it, this will shut down all the naive
>>> tutorials/courses still teaching it as the default!
>>>
>>>
>>> As for std::newline, we have options -
>>>
>>> std::nl //< even a beginner can "read" it
>>> std::newl //< orthogonal to endl
>>> std::br //< why not at this point!
>>> std::brl
>>> std::bl
>>>
>>> Geeks can still use `\n`, but a beginner (and a teacher) will have a
>>> simple, *correct, *go-to option that models the syntax already
>>> introduced (std::cout)!
>>>
>>>
>>> On Friday, November 9, 2018 at 8:22:26 AM UTC+2, PeterSommerlad wrote:
>>>>
>>>> So the better way is do better teaching. I show my students that they
>>>> should not use endl, except when they need it.
>>>>
>>>> Sent from Peter Sommerlad's iPad
>>>> +41 79 432 23 32
>>>>
>>>> On 8 Nov 2018, at 23:43, Hyman Rosen <hyman...@gmail.com> wrote:
>>>>
>>>> On Thu, Nov 8, 2018 at 5:08 PM Brian Bi <bbi...@gmail.com> wrote:
>>>>
>>>>> 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.
>>>>>
>>>>
>>>> I think novices use std::endl because that's how C++ formatted I/O
>>>> was presented for ages.  I have the feeling, completely unsupported
>>>> by evidence, that the iostreams designers thought manipulators were
>>>> really keen, and wanted to have one that would always get used.
>>>>
>>>> --
>>>> 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.
>>>> To post to this group, send email to std-pr...@isocpp.org.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAHSYqdYYZjeHHbRZ5bcHLYVsWfspwCeQ8oxEDRbuJ8dqAtsX5A%40mail.gmail.com
>>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAHSYqdYYZjeHHbRZ5bcHLYVsWfspwCeQ8oxEDRbuJ8dqAtsX5A%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>> --
>>> 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.
>>> To post to this group, send email to std-pr...@isocpp.org.
>>> To view this discussion on the web visit
>>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/b49f4c85-816b-4b35-851d-407061a8ef9f%40isocpp.org
>>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/b49f4c85-816b-4b35-851d-407061a8ef9f%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/7da1f33f-c2c1-482f-8fc2-c23a9767a5ec%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/7da1f33f-c2c1-482f-8fc2-c23a9767a5ec%40isocpp.org?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CALmDwq1wq9pKv3Esy4AXepnSMotfXTwoJ3BUQwHdmJza2gWP_Q%40mail.gmail.com.

--00000000000008cec8057a511f7d
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto">You&#39;re going to have a hard time because the committe=
e doesn&#39;t like iostreams and plans on replacing them with something els=
e.<div dir=3D"auto"><br></div><div dir=3D"auto">And I don&#39;t really see =
a problem with \n. Sure, it&#39;s a bit old-school, but it&#39;s clear and =
almost every language uses it. If you&#39;re programming you&#39;ll going t=
o have to learn \n eventually.</div></div><br><div class=3D"gmail_quote"><d=
iv dir=3D"ltr">On Sat, Nov 10, 2018, 7:24 AM  &lt;<a href=3D"mailto:mihailn=
ajdenov@gmail.com">mihailnajdenov@gmail.com</a> wrote:<br></div><blockquote=
 class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc soli=
d;padding-left:1ex"><div dir=3D"ltr"><br><br>On Friday, November 9, 2018 at=
 6:50:59 PM UTC+2, 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"ltr"><br><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Fr=
i, Nov 9, 2018 at 3:19 AM &lt;<a rel=3D"nofollow noreferrer">mihailn...@gma=
il.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"m=
argin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"l=
tr">There are multiple problems with &#39;\n&#39;<div><br></div><div>First =
- it is ultimately C (&quot;way&quot;)</div></div></blockquote><div>This ma=
iling list is about C++, not Java, Rust, Swift, etc.</div><div>This is not =
an argument.</div></div></div></blockquote><div><br></div><div>There is som=
e sort of miscommunication.=C2=A0</div><div>The fact there no C++ way to in=
sert a new line (only a UNIX special character way) is what I state an issu=
e,=C2=A0</div><div>considering the rest of the API=C2=A0</div><div>=C2=A0</=
div><blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;b=
order-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div class=3D"=
gmail_quote"><div><br></div><blockquote class=3D"gmail_quote" style=3D"marg=
in:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"=
><div>Second, when we introduce simple output to beginners, for which cout =
is actually good because of overloading,</div><div>when using &#39;\n&#39; =
we have to introduce additional topics=C2=A0<br><div>=C2=A0- the fact a cha=
r can be more the one, well, character</div><div>=C2=A0- special magic char=
acters</div><div>We also create asymmetry b/w what is used to start the out=
put std::cout (an object), to modify it (hex) and what is used to end it (&=
quot;magic&quot;).</div></div></div></blockquote></div></div></blockquote><=
div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0;margin-=
left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><d=
iv class=3D"gmail_quote"><div>What do you mean, &quot;what is used to end i=
t&quot;? A semicolon?</div></div></div></blockquote><div><br></div><div><di=
v><font face=3D"courier new, monospace">std::cout=C2=A0 =C2=A0 =C2=A0//&lt;=
 start=C2=A0</font></div><div><font face=3D"courier new, monospace">=C2=A0 =
&lt;&lt; 12.f=C2=A0</font></div><div><font face=3D"courier new, monospace">=
=C2=A0 &lt;&lt; &#39; &#39;=C2=A0</font></div><div><font face=3D"courier ne=
w, monospace">=C2=A0 &lt;&lt; std::hex //&lt; modify</font></div><div><font=
 face=3D"courier new, monospace">=C2=A0 &lt;&lt; 255</font></div><div><font=
 face=3D"courier new, monospace">=C2=A0 &lt;&lt; &#39;\n&#39;;=C2=A0 =C2=A0=
 //&lt; finish (magic)=C2=A0</font></div></div><div><br></div><div>Note tha=
t printf (and other languages) already use special characters to modify the=
 output, so having an &#39;\n&#39; is not abrupt.</div><div><br></div><div>=
But C++ streams are different, having to spell out a special character is o=
dd and unintuitive for a beginner and a design deficiency in general.=C2=A0=
=C2=A0</div><div><br></div><div><br></div><blockquote class=3D"gmail_quote"=
 style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-lef=
t:1ex"><div dir=3D"ltr"><div class=3D"gmail_quote"><div>=C2=A0</div><blockq=
uote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc =
solid;padding-left:1ex"><div dir=3D"ltr"><div><div><br></div><div>This scre=
ams some design flaw - we should be able to insert a new lines the same way=
 we modify the stream!</div></div></div></blockquote><div>Yes, the way to d=
o that is with &#39;\n&#39;.</div><div>=C2=A0</div><blockquote class=3D"gma=
il_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-lef=
t:1ex"><div dir=3D"ltr"><div><div><br></div><div>On its own std::endl has t=
he flaw that it does not obey the &quot;do one thing&quot; rule.</div><div>=
Once we deprecate it, this will shut down all the naive tutorials/courses s=
till teaching it as the default!=C2=A0</div><div><br></div><div><br></div><=
div>As for std::newline, we have options -=C2=A0</div><div><br></div><div><=
font face=3D"courier new, monospace">std::nl //&lt; even a beginner can &qu=
ot;read&quot; it</font></div><div><font face=3D"courier new, monospace">std=
::newl //&lt; orthogonal to endl</font></div><div><font face=3D"courier new=
, monospace">std::br //&lt; why not at this point!</font></div><div><font f=
ace=3D"courier new, monospace">std::brl</font></div><div><font face=3D"cour=
ier new, monospace">std::bl</font></div><div><br></div><div>Geeks can still=
 use `\n`, but a beginner (and a teacher) will have a simple, <i>correct,=
=C2=A0</i>go-to option that models the syntax already introduced (std::cout=
)!</div><div><br><br>On Friday, November 9, 2018 at 8:22:26 AM UTC+2, Peter=
Sommerlad 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"auto">S=
o the better way is do better teaching. I show my students that they should=
 not use endl, except when they need it.<br><br><div dir=3D"ltr">Sent from =
Peter Sommerlad&#39;s<span>=C2=A0iPad</span><div><span>+41 79 432 23 32</sp=
an></div></div><div dir=3D"ltr"><br>On 8 Nov 2018, at 23:43, Hyman Rosen &l=
t;<a rel=3D"nofollow noreferrer">hyman...@gmail.com</a>&gt; wrote:<br><br><=
/div><blockquote type=3D"cite"><div dir=3D"ltr"><div dir=3D"ltr"><div class=
=3D"gmail_quote"><div dir=3D"ltr">On Thu, Nov 8, 2018 at 5:08 PM Brian Bi &=
lt;<a rel=3D"nofollow noreferrer">bbi...@gmail.com</a>&gt; wrote:</div><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #c=
cc solid;padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_quote"><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::endl =
is portable whereas &#39;\n&#39; isn&#39;t.</div></div></div></blockquote><=
div><br>I think novices use std::endl because that&#39;s how C++ formatted =
I/O<br>was presented for ages.=C2=A0 I have the feeling, completely unsuppo=
rted<br>by evidence, that the iostreams designers thought manipulators were=
<br>really keen, and wanted to have one that would always get used.</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 rel=3D"nofollow noreferrer">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow noreferrer">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/CAHSYqdYYZjeHHbRZ5bcHLYVsWfspwCeQ8oxE=
DRbuJ8dqAtsX5A%40mail.gmail.com?utm_medium=3Demail&amp;utm_source=3Dfooter"=
 rel=3D"nofollow noreferrer" target=3D"_blank">https://groups.google.com/a/=
isocpp.org/d/msgid/std-proposals/CAHSYqdYYZjeHHbRZ5bcHLYVsWfspwCeQ8oxEDRbuJ=
8dqAtsX5A%40mail.gmail.com</a>.<br>
</div></blockquote></div></blockquote></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 rel=3D"nofollow noreferrer">std-proposal...@isocpp.org</a>.<br>
To post to this group, send email to <a rel=3D"nofollow noreferrer">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/b49f4c85-816b-4b35-851d-407061a8ef9f%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" rel=3D"nofollow no=
referrer" target=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/=
std-proposals/b49f4c85-816b-4b35-851d-407061a8ef9f%40isocpp.org</a>.<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" target=3D"_=
blank" rel=3D"noreferrer">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" rel=3D"noreferrer">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/7da1f33f-c2c1-482f-8fc2-c23a9767a5ec%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank" =
rel=3D"noreferrer">https://groups.google.com/a/isocpp.org/d/msgid/std-propo=
sals/7da1f33f-c2c1-482f-8fc2-c23a9767a5ec%40isocpp.org</a>.<br>
</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/CALmDwq1wq9pKv3Esy4AXepnSMotfXTwoJ3BU=
QwHdmJza2gWP_Q%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CALmDwq1wq9pKv3Es=
y4AXepnSMotfXTwoJ3BUQwHdmJza2gWP_Q%40mail.gmail.com</a>.<br />

--00000000000008cec8057a511f7d--

.
