Topic: Can we have beginner friendly new line and deprecate std::endl?


Author: mihailnajdenov@gmail.com
Date: Thu, 8 Nov 2018 05:37:54 -0800 (PST)
Raw View
------=_Part_344_1180354855.1541684274435
Content-Type: multipart/alternative;
 boundary="----=_Part_345_1979542089.1541684274435"

------=_Part_345_1979542089.1541684274435
Content-Type: text/plain; charset="UTF-8"

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/e17189bf-51be-496d-845a-3707a516a210%40isocpp.org.

------=_Part_345_1979542089.1541684274435
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Wouldn&#39;t it be miles better to instead of <a href=3D"h=
ttps://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md=
#slio50-avoid-endl">un-teaching people from std::endl and advertise &#39;\n=
&#39;</a> to have equally attractive alternative?<div><br></div><div>The po=
int is - &#39;\n&#39; is not in any way beginner friendly as it is not an s=
td or build in &quot;command&quot;/object, but some alien symbol (to a new =
comer) like, literally nothing else - it does not even look a single charac=
ter.</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 rarel=
y used a t all)=C2=A0</div><div><br></div><div>Also, if we have a friendly =
new line alternative we could deprecate endl and teach to new-line-and-flus=
h-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">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/e17189bf-51be-496d-845a-3707a516a210%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/e17189bf-51be-496d-845a-3707a516a210=
%40isocpp.org</a>.<br />

------=_Part_345_1979542089.1541684274435--

------=_Part_344_1180354855.1541684274435--

.


Author: andrzejuk.robert@gmail.com
Date: Sat, 17 Nov 2018 11:41:33 -0800 (PST)
Raw View
------=_Part_1640_704988449.1542483693463
Content-Type: text/plain; charset="UTF-8"


If the purpose is on teaching, than for sure special characters have to be introduced sometime.
Maybe teach this?

   const auto newline = '\n'; // constexpr maybe?

--
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/019c1be1-2686-4075-8e06-be110b83e038%40isocpp.org.

------=_Part_1640_704988449.1542483693463--

.