220 31018 <c65781eb-0611-40f0-9517-74e4b505a26d@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Victor Dyachenko <victor.dyachenko@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: operator<< for std::string
Date: Tue, 21 Feb 2017 07:42:58 -0800 (PST)
Lines: 105
Approved: news@gmane.org
Message-ID: <c65781eb-0611-40f0-9517-74e4b505a26d@isocpp.org>
References: <7552b5b4-e778-46a2-a6f8-fabca5b16dc4@isocpp.org>
 <75e1c827-a2af-4dfa-9426-dc5a00a0d408@isocpp.org>
 <c1f7a833-a8fa-48d7-96c2-1ffe8ae292fc@isocpp.org>
 <85aefeb5-3c83-47de-a91d-3aef22d6a1ec@isocpp.org>
 <5f77cec0-c0b3-4993-9c3e-318c7e985f7f@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1439_932595324.1487691778884"
X-Trace: blaine.gmane.org 1487691783 23323 195.159.176.226 (21 Feb 2017 15:43:03 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 21 Feb 2017 15:43:03 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCJ4XEO5S4ERBA6AWHCQKGQE3IHESNY@isocpp.org Tue Feb 21 16:42:57 2017
Return-path: <std-proposals+bncBCJ4XEO5S4ERBA6AWHCQKGQE3IHESNY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oi0-f71.google.com ([209.85.218.71])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCJ4XEO5S4ERBA6AWHCQKGQE3IHESNY@isocpp.org>)
	id 1cgCac-0005Df-H5
	for gclcip-std-proposals@m.gmane.org; Tue, 21 Feb 2017 16:42:54 +0100
Original-Received: by mail-oi0-f71.google.com with SMTP id s131sf21305190oia.6
        for <gclcip-std-proposals@m.gmane.org>; Tue, 21 Feb 2017 07:43:00 -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
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=1XQKB1NBw5IiImOvGJ1vLvCWs8/P8IVHB1JuxeUqSBc=;
        b=Ps34szAqoZhM2sNBBR/N+TZqLBysgRqpad0iw2nZlBvMj+amQL2i23sHIMTDDs8Qtd
         6/3i2Pjs6jVPTuFyAFVDmuYJPgzLcF8fLxKlKK9qbPpfaWo9WO3vb3xta+KHo3Xnrcxr
         Heqc+DU6DVHPoC6XAHm7j2DlH3u6ir/xBunsbRSSm+m+BlQ91KSwl/eO+GxGy4f9qXMo
         PalGAXA2k4w878pSLoUsWoIZU6Q4bZP/y2h86u/bZQpBo/sqrNsPoozwDf+SGgDeezJS
         o4CqIkkYuO/kj78Lhn8bQWdmVCppam2e2QfgepWOYid5TFuHOsa1AAjC3FeS3BP9ogUC
         8+Sw==
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
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=1XQKB1NBw5IiImOvGJ1vLvCWs8/P8IVHB1JuxeUqSBc=;
        b=FMl6LJyrsKAC1CRbdxitI+gbH59vZFBUBFuKVejZ/vWQZmVRoI8MqKRxtb1pDe1B4H
         y+7TmJKtOaS+QmEZWOwSeVFwbCF6/Va58UFqF2O8vvMBf0jcO/6bnkEg5hsiQ046NHKS
         e6K6LteKnk510AeKKanNJVvHyE4PB8D4nebD2lKkFOlwXfNkHlYjHQsFdPgQKmQjcHMo
         JY/XT7uwfJ4YMxXRV4J51wdQY6OuHC1TxMoJBKFpcZSlXHiLXOr9koZilqgqszyz6em6
         b7iQiZeHIOCGcaSnXb1LhcCq3bO2P7EyYBmVFUzjJjQX2NYd3ZCdLkAwVvjUXnx9Pa7U
         ohmA==
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=1XQKB1NBw5IiImOvGJ1vLvCWs8/P8IVHB1JuxeUqSBc=;
        b=pfC7SR27aAkstUJSR4TB5kBkFE1VPr7ZNtYDiPVvcFZPKCLur9w2GwO0hzfVywaGYF
         O3WEJjov2GStLrM6mBeaf4dpK3oF7RdxT6V1dDgb4EF1ZikgOJdlxBMudVYlctVH2YoV
         KUYnqQRw5MPRVpJCFSH76J/x+ejNEb9zb6UMR9NSIDYmsFpxH75aKZ6RAZCO0Y1YzIUy
         5OFbfPJ8TreyiH4/GusItjAwJYpEZM02PmlTIs+x+65eDvoBVhZJsVhZHWtKZIqYm83e
         8PLjwuwSbpjNsGpd/fUk7Ql4xdY9agDHivd/MytmgvAIGO19ZRMENV2+cCFpWZ6NZ75b
         q13Q==
X-Gm-Message-State: AMke39klcpxLBHD9Sa7UL2Unq1y6uixdfSdN+Jf2gwZaQXkyP8bOR5OFPLePVVpnEKclkA==
X-Received: by 10.157.54.55 with SMTP id w52mr9169746otb.135.1487691780141;
        Tue, 21 Feb 2017 07:43:00 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.37.235 with SMTP id q98ls10747522ota.1.gmail; Tue, 21 Feb
 2017 07:42:59 -0800 (PST)
X-Received: by 10.157.8.10 with SMTP id 10mr1731674oty.19.1487691779405;
        Tue, 21 Feb 2017 07:42:59 -0800 (PST)
In-Reply-To: <5f77cec0-c0b3-4993-9c3e-318c7e985f7f@isocpp.org>
X-Original-Sender: Victor.Dyachenko@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <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:31018
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/31018>

------=_Part_1439_932595324.1487691778884
Content-Type: multipart/alternative; 
	boundary="----=_Part_1440_1786502454.1487691778885"

------=_Part_1440_1786502454.1487691778885
Content-Type: text/plain; charset=UTF-8

On Tuesday, February 21, 2017 at 6:39:31 PM UTC+3, Victor Dyachenko wrote:
>
> On Tuesday, February 21, 2017 at 6:31:01 PM UTC+3, Nicol Bolas wrote:
>>
>> On Tuesday, February 21, 2017 at 1:31:33 AM UTC-5, Victor Dyachenko wrote:
>>>
>>> Streams are NOT alternative to std::string! By many reasons.
>>>
>>
>> Can you list some of them? Because many languages' standard libraries 
>> have a distinction between the every-day string type and "string builder" 
>> types. Java 
>> <http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuilder.html> 
>> and C# 
>> <https://msdn.microsoft.com/en-us/library/system.text.stringbuilder(v=vs.110).aspx> 
>> being prominent examples.
>>
>> The only problem with C++'s stringstream is the cost of moving strings 
>> into/outof them. And that proposal would remove that cost.
>>
>
> Top two:
>
> 1) Streams are slow (overcomplicated design, virtual calls, locales, too 
> generic)
> 2) Streams are huge - statically linked "hello world" is more than 1Mb 
> (again mostly because of locales)
>

And that's why now we have std::to_chars/from_chars() 

-- 
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/c65781eb-0611-40f0-9517-74e4b505a26d%40isocpp.org.

------=_Part_1440_1786502454.1487691778885
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Tuesday, February 21, 2017 at 6:39:31 PM UTC+3, Victor =
Dyachenko 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">On Tuesday, February 21, 2017 at 6:31:01 PM UTC+3, Nicol Bolas wrote:<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">On Tuesday, February =
21, 2017 at 1:31:33 AM UTC-5, Victor Dyachenko wrote:<blockquote class=3D"g=
mail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;=
padding-left:1ex"><div dir=3D"ltr">Streams are NOT alternative to std::stri=
ng! By many reasons.<br></div></blockquote><div><br>Can you list some of th=
em? Because many languages&#39; standard libraries have a distinction betwe=
en the every-day string type and &quot;string builder&quot; types. <a href=
=3D"http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuilder.html" =
rel=3D"nofollow" target=3D"_blank" onmousedown=3D"this.href=3D&#39;http://w=
ww.google.com/url?q\x3dhttp%3A%2F%2Fdocs.oracle.com%2Fjavase%2F7%2Fdocs%2Fa=
pi%2Fjava%2Flang%2FStringBuilder.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQ=
jCNELDcP1ubLPKRXC1xz7Uk3NlrvK7A&#39;;return true;" onclick=3D"this.href=3D&=
#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdocs.oracle.com%2Fjavase%2F=
7%2Fdocs%2Fapi%2Fjava%2Flang%2FStringBuilder.html\x26sa\x3dD\x26sntz\x3d1\x=
26usg\x3dAFQjCNELDcP1ubLPKRXC1xz7Uk3NlrvK7A&#39;;return true;">Java</a> and=
 <a href=3D"https://msdn.microsoft.com/en-us/library/system.text.stringbuil=
der(v=3Dvs.110).aspx" rel=3D"nofollow" target=3D"_blank" onmousedown=3D"thi=
s.href=3D&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmsdn.microsoft.=
com%2Fen-us%2Flibrary%2Fsystem.text.stringbuilder(v%3Dvs.110).aspx\x26sa\x3=
dD\x26sntz\x3d1\x26usg\x3dAFQjCNHaVnEaqQ-DNPDwn3rpnAkLCCtOzQ&#39;;return tr=
ue;" onclick=3D"this.href=3D&#39;https://www.google.com/url?q\x3dhttps%3A%2=
F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fsystem.text.stringbuilder(v%3Dvs=
..110).aspx\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHaVnEaqQ-DNPDwn3rpnAkLCC=
tOzQ&#39;;return true;">C#</a> being prominent examples.<br><br>The only pr=
oblem with C++&#39;s stringstream is the cost of moving strings into/outof =
them. And that proposal would remove that cost.<br></div></div></blockquote=
><div><br>Top two:<br><br>1) Streams are slow (overcomplicated design, virt=
ual calls, locales, too generic)<br>2) Streams are huge - statically linked=
 &quot;hello world&quot; is more than 1Mb (again mostly because of locales)=
</div></div></blockquote><div><br>And that&#39;s why now we have std::to_ch=
ars/from_chars() <br></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/c65781eb-0611-40f0-9517-74e4b505a26d%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/c65781eb-0611-40f0-9517-74e4b505a26d=
%40isocpp.org</a>.<br />

------=_Part_1440_1786502454.1487691778885--

------=_Part_1439_932595324.1487691778884--

.
