220 40941 <CALmDwq1jR7r2m6fFVVDMzjwDkfptcDN6bZF8mr9z+kYcteLaNA@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 09:04:49 -0800
Lines: 395
Approved: news@gmane.org
Message-ID: <CALmDwq1jR7r2m6fFVVDMzjwDkfptcDN6bZF8mr9z+kYcteLaNA@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> <CALmDwq1wq9pKv3Esy4AXepnSMotfXTwoJ3BUQwHdmJza2gWP_Q@mail.gmail.com>
 <f7bd155a-bcbf-49f0-ac34-f0628ccf50e1@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="000000000000db2c34057a5277ce"
X-Trace: blaine.gmane.org 1541869376 8977 195.159.176.226 (10 Nov 2018 17:02:56 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sat, 10 Nov 2018 17:02:56 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDXKNLEUTADRBPM7TTPQKGQEDYS4O2Q@isocpp.org Sat Nov 10 18:02:52 2018
Return-path: <std-proposals+bncBDXKNLEUTADRBPM7TTPQKGQEDYS4O2Q@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oi1-f198.google.com ([209.85.167.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDXKNLEUTADRBPM7TTPQKGQEDYS4O2Q@isocpp.org>)
	id 1gLWeq-000299-6X
	for gclcip-std-proposals@m.gmane.org; Sat, 10 Nov 2018 18:02:52 +0100
Original-Received: by mail-oi1-f198.google.com with SMTP id a188-v6sf2962725oih.0
        for <gclcip-std-proposals@m.gmane.org>; Sat, 10 Nov 2018 09:05:02 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1541869502; cv=pass;
        d=google.com; s=arc-20160816;
        b=q4nPsgUrLaEoW/d+YOCJdBh8XdvxJxiyXy8dMU11FlU2L2IN8QZk7z8FtZVwUYbSLK
         k9SlasALkMDvni0Qu3l5nU9QfyW2GDEODh9rHI7a9atBM8vNO5FD+70gpoZWgqvPJjSN
         3qRdSEicePhcJX9r2YxByUigYq8Gr48gl3P+RhOE54ZubHT2FVecZMGobIUJGdEoSU9W
         u0SmMrQSm4W3bkNjiD5k/N9o2RnBCDUf7GQ5Wol/i3T0dVFuS91IJq8ZEcMHjzBudkTZ
         vnHMyMWBIC0meJOkrpadHNpjRshpW9aqrJwIfSloi56/NfaQZZl8Wcve74QkO+360oGH
         ihUg==
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=dGEE+U+byN22TJOuwjKnM/0u2mxjL9pOZ8DoOtmCIzc=;
        b=Uc6cQW99rFM0cg5UQt39LPXrkpU/Q0aXKLftpySuoWK8s8+CavXbN8udkBMFe5eSO9
         /xR4HWLlxQOlFMdlQM4mxTnwfS/vNbr5GW0/eYdteudKQjjknLeBX1tOvKZCnPKaZDIS
         rFDar0YJa4lbRZkcQd5widXzYNwLzasjxgjoffmZjWtJNK8A3G+5ggNH+MYZcXDERrbi
         PK8nS5gcmJY8hWpDyb6CmjDYa4HpOFLHfzr0E2yhEqgWjO+pt/hQmh3GvvRHyHZdh648
         KrDu9BUcQrV7zHcixpT8tKVoneUke34uYwv6QStJz5Sm9KFuMos8fEsSbL1oq96+jemo
         lKJQ==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=GdQwM8+X;
       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=dGEE+U+byN22TJOuwjKnM/0u2mxjL9pOZ8DoOtmCIzc=;
        b=sDGT+OL/3m93ujtS2vGhSWkoXXVi6wnY5u3dydyMQcNN29QPHMjlN8rOrJ6l5i7/Tn
         b5ZfSdSnome4c49Xx6SScHkz2oYCwEvhiujSkksb2A7oFauU/SpJrRFOBPn311uWLnF9
         rY5mxvf8FeXgsFIBYePUxO9Jv9Z2z3gvgdl6VS0hCLZlS9OnwRCp/2ERC6r1XvNB0PSX
         +zEckhQxGvxUDzKNjEolJi+4U5CCtIcl/tD+B9RtkuhSLhgOBruhGuc59+wU0G3Gs8Xs
         HynO9ZCyGfgkzzX0Fckd83pKe38dOCjDlI1FFGRVlvzzFpNYI9z1Kt9oNfvgKfnVRTwe
         YrEw==
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=dGEE+U+byN22TJOuwjKnM/0u2mxjL9pOZ8DoOtmCIzc=;
        b=DUX8qJY5Ez01JoDlU+WmqZFLsVkvdfP0lnPWRjKrzyv1nZzdcQYtKYlxzQGthNvCbu
         uTiwGfXZ6vR6XQiRGx7BAW/gkedChOPiijk0KJX+/wLllG/1BMRdLLp0rFtNqeMNP6Mx
         EbW+2vVvMJZiMvsLjatTh46UsiTTS6IFKJfrh6+gS+id35JqU/mWk6OMo41swtISWqKU
         L50riFmyvzEDNe5o5sNQjfrbqK0bXzB581iPPOzv3s+1p9vlYNk0pFi1YaL+axQ9ShRy
         jMc4UXVX1u0J+HW7y/JH/ZjCDWYuAHxPTeAQk981PnWsbTvC8su/DVUiXJYqRW5KDNEZ
         6BKA==
X-Gm-Message-State: AGRZ1gLqxylC375LITmTpg+Oqgkhc9BAiKqlB9QZHtwhrXDQlGjhd+1l
	WkXgi0tk/j8VFdKDpxz6a2pBpQ==
X-Google-Smtp-Source: AJdET5eXeu0d+qrLfmaHtG6zbJHSDLoYuQUJwEc6mpG/t4ap0x61t9Hgvm4y+vOQGMIqa+/xg1NrSg==
X-Received: by 2002:a9d:3a25:: with SMTP id j34mr9620920otc.17.1541869502186;
        Sat, 10 Nov 2018 09:05:02 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:aca:3444:: with SMTP id b65-v6ls2023810oia.1.gmail; Sat, 10
 Nov 2018 09:05:01 -0800 (PST)
X-Received: by 2002:a54:4382:: with SMTP id u2-v6mr7775559oiv.155.1541869501018;
        Sat, 10 Nov 2018 09:05:01 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1541869500; cv=none;
        d=google.com; s=arc-20160816;
        b=ut4lSKUkPkPo9khEjmhlemwjWN8b8V+LSmGv47/0b/3n/YJwzxupigPmGDGsWWqipi
         O9Fp6SB3dcyUsRHXYG7hkSKwYTIolbbqvg8JsPLXVOI/rGlwzNO/dSYCNmqU6O4D6+Uk
         /3uUZKo8frajpZfPHROZBpCCPukc0+U/3rNu6Wta7wyLQvgfKshp9NIwjIQLrjjXAaCE
         QRgCt0RTN+0u2AxtduQL3/XYHrr5lF+Z9AxVRewk673N/hA7m3dOBLUAjdNASrmLa+Wu
         2l7nBS6KmZcC1SVXdjy7kQCo3F4V3RAsBV2JwfjoPGMqBWIukOB5pg5bjwxUDRdkpEPJ
         hvHA==
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=83SlLBq9I2+AtnQaKa5H1MB5B+S2u0E9P3AMh16H5x8=;
        b=T1diZNCA/oVr7VZ55LwFtm9UFV8+uwDHvvGnmg8udWcGjf+UYJjyuilheGHkA7uaXF
         qVYzBXzodUoxA7EOsrOGQLG4BGQyr2fYczLSCLEKz7kaDHiFdIjdSgr8Vcxkkh+R2miD
         ZOLRmGRKiteqYNnJg0x7AScmvqnFbRDcfILhAp0tbXKMWCEgviVzUahmzDL2L6DSO/gw
         kXUBZBlI+47whr7ez/Ai6PT4fIbtntz48a19Ury1i6K4rc8Zjt/CmKlh0Kt+6BPK3Y1P
         IGAhDpNrS+sXXfWGgQOYU+leH5b3/659LuYowCnjbiShr4Cnj+ruEAPaYyrHpbnjcryY
         0y8Q==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=GdQwM8+X;
       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 e14sor6541911otk.75.2018.11.10.09.05.00
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Sat, 10 Nov 2018 09:05:00 -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:a9d:4333:: with SMTP id s48mr7718763ote.347.1541869500311;
 Sat, 10 Nov 2018 09:05:00 -0800 (PST)
In-Reply-To: <f7bd155a-bcbf-49f0-ac34-f0628ccf50e1@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=GdQwM8+X;       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:40941
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/40941>

--000000000000db2c34057a5277ce
Content-Type: text/plain; charset="UTF-8"

On Sat, Nov 10, 2018, 9:02 AM <mihailnajdenov@gmail.com wrote:

>
>
> On Saturday, November 10, 2018 at 5:28:37 PM UTC+2, Nicolas Lesser wrote:
>>
>> You're going to have a hard time because the committee doesn't like
>> iostreams and plans on replacing them with something else.
>>
>
> Are there any proposals in flight? I see Text Formating
> <http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2018/p0645r3.html>,
> but it does not include I/O (AFAICT)
>

I don't actually know. It's just what I've been hearing. Don't know how
accurate that is though...

>
>
>>
>> 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 <mihailn...@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-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/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/f7bd155a-bcbf-49f0-ac34-f0628ccf50e1%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/f7bd155a-bcbf-49f0-ac34-f0628ccf50e1%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/CALmDwq1jR7r2m6fFVVDMzjwDkfptcDN6bZF8mr9z%2BkYcteLaNA%40mail.gmail.com.

--000000000000db2c34057a5277ce
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div><br><br><div class=3D"gmail_quote"><div dir=3D"ltr">=
On Sat, Nov 10, 2018, 9:02 AM  &lt;<a href=3D"mailto:mihailnajdenov@gmail.c=
om">mihailnajdenov@gmail.com</a> wrote:<br></div><blockquote class=3D"gmail=
_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:=
1ex"><div dir=3D"ltr"><br><br>On Saturday, November 10, 2018 at 5:28:37 PM =
UTC+2, Nicolas Lesser wrote:<blockquote class=3D"gmail_quote" style=3D"marg=
in:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div di=
r=3D"auto">You&#39;re going to have a hard time because the committee doesn=
&#39;t like iostreams and plans on replacing them with something else.</div=
></blockquote><div><br></div><div>Are there any proposals in flight? I see =
<a href=3D"http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2018/p0645r3.=
html" target=3D"_blank" rel=3D"noreferrer">Text Formating=C2=A0</a>, but it=
 does not include I/O (AFAICT)=C2=A0</div></div></blockquote></div></div><d=
iv dir=3D"auto"><br></div><div dir=3D"auto">I don&#39;t actually know. It&#=
39;s just what I&#39;ve been hearing. Don&#39;t know how accurate that is t=
hough...=C2=A0</div><div dir=3D"auto"><div class=3D"gmail_quote"><blockquot=
e class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc sol=
id;padding-left:1ex"><div dir=3D"ltr"><div>=C2=A0</div><blockquote class=3D=
"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc soli=
d;padding-left:1ex"><div dir=3D"auto"><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 bi=
t old-school, but it&#39;s clear and almost every language uses it. If you&=
#39;re programming you&#39;ll going to have to learn \n eventually.</div></=
div><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Sat, Nov 10, 2018, 7=
:24 AM  &lt;<a rel=3D"nofollow noreferrer">mihailn...@gmail.com</a> wrote:<=
br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;borde=
r-left:1px #ccc solid;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 Fri, Nov 9, 2018 at 3:19 AM &lt;<a rel=3D"nofollow noreferr=
er noreferrer">mihailn...@gmail.com</a>&gt; wrote:<br></div><blockquote cla=
ss=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;pa=
dding-left:1ex"><div dir=3D"ltr">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 mailing list is about C++, not Java, Rust, Swift=
, etc.</div><div>This is not an argument.</div></div></div></blockquote><di=
v><br></div><div>There is some sort of miscommunication.=C2=A0</div><div>Th=
e fact there no C++ way to insert a new line (only a UNIX special character=
 way) is what I state an issue,=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;border-left:1px #ccc solid;padding-left:1ex"><d=
iv dir=3D"ltr"><div class=3D"gmail_quote"><div><br></div><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-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 char can be more the one, well, character</div><=
div>=C2=A0- special magic characters</div><div>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 (&quot;magic&quot;).</div></div></div></blockqu=
ote></div></div></blockquote><div>=C2=A0</div><blockquote class=3D"gmail_qu=
ote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding=
-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_quote"><div>What do you mea=
n, &quot;what is used to end it&quot;? A semicolon?</div></div></div></bloc=
kquote><div><br></div><div><div><font face=3D"courier new, monospace">std::=
cout=C2=A0 =C2=A0 =C2=A0//&lt; start=C2=A0</font></div><div><font face=3D"c=
ourier new, monospace">=C2=A0 &lt;&lt; 12.f=C2=A0</font></div><div><font fa=
ce=3D"courier new, monospace">=C2=A0 &lt;&lt; &#39; &#39;=C2=A0</font></div=
><div><font face=3D"courier new, 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></di=
v><div><br></div><div>Note that printf (and other languages) already use sp=
ecial characters to modify the output, so having an &#39;\n&#39; is not abr=
upt.</div><div><br></div><div>But C++ streams are different, having to spel=
l out a special character is odd and unintuitive for a beginner and a desig=
n deficiency in general.=C2=A0=C2=A0</div><div><br></div><div><br></div><bl=
ockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-l=
eft:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_q=
uote"><div>=C2=A0</div><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=
><div><br></div><div>This screams some design flaw - we should be able to i=
nsert a new lines the same way we modify the stream!</div></div></div></blo=
ckquote><div>Yes, the way to do that is with &#39;\n&#39;.</div><div>=C2=A0=
</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-l=
eft:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><div><br></div><=
div>On its own std::endl has the flaw that it does not obey the &quot;do on=
e thing&quot; rule.</div><div>Once we deprecate it, this will shut down all=
 the naive tutorials/courses still 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 &quot;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 face=3D"courier new, monospace">std::brl</fon=
t></div><div><font face=3D"courier new, monospace">std::bl</font></div><div=
><br></div><div>Geeks can still use `\n`, but a beginner (and a teacher) wi=
ll 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, 20=
18 at 8:22:26 AM UTC+2, PeterSommerlad wrote:<blockquote class=3D"gmail_quo=
te" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-=
left:1ex"><div dir=3D"auto">So the better way is do better teaching. I show=
 my students that they should not use endl, except when they need it.<br><b=
r><div dir=3D"ltr">Sent from Peter Sommerlad&#39;s<span>=C2=A0iPad</span><d=
iv><span>+41 79 432 23 32</span></div></div><div dir=3D"ltr"><br>On 8 Nov 2=
018, at 23:43, Hyman Rosen &lt;<a rel=3D"nofollow noreferrer noreferrer">hy=
man...@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">O=
n Thu, Nov 8, 2018 at 5:08 PM Brian Bi &lt;<a rel=3D"nofollow noreferrer no=
referrer">bbi...@gmail.com</a>&gt; wrote:</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"><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 pe=
rpetuated 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 unsupported<br>by evidence, tha=
t the iostreams designers thought manipulators were<br>really keen, and wan=
ted 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 noreferrer">std-proposal...@isocpp.or=
g</a>.<br>
To post to this group, send email to <a rel=3D"nofollow noreferrer noreferr=
er">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 noreferrer">std-proposal...@isocpp.or=
g</a>.<br>
To post to this group, send email to <a rel=3D"nofollow noreferrer noreferr=
er">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 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/7da1f33f-c2c1-482f-8fc2-c23a9767a5ec%=
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/7da1f33f-c2c1-482f-8fc2-c23a9767a5ec%40isocpp.org</a>.<br>
</blockquote></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" 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/f7bd155a-bcbf-49f0-ac34-f0628ccf50e1%=
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/f7bd155a-bcbf-49f0-ac34-f0628ccf50e1%40isocpp.org</a>.<br>
</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 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/CALmDwq1jR7r2m6fFVVDMzjwDkfptcDN6bZF8=
mr9z%2BkYcteLaNA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CALmDwq1jR7r2m6=
fFVVDMzjwDkfptcDN6bZF8mr9z%2BkYcteLaNA%40mail.gmail.com</a>.<br />

--000000000000db2c34057a5277ce--

.
