220 38191 <CAANG=kVyVpTzS74BYKin6yEpvwh1AXCyS1sF53ck9i+J+dvqMQ@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: =?UTF-8?B?R2HFoXBlciBBxb5tYW4=?= <gasper.azman@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Overloaded member functions substr of the
 class template std::basic_string.
Date: Fri, 25 May 2018 13:35:13 +0100
Lines: 143
Approved: news@gmane.org
Message-ID: <CAANG=kVyVpTzS74BYKin6yEpvwh1AXCyS1sF53ck9i+J+dvqMQ@mail.gmail.com>
References: <0f2291ff-62f1-4eda-9435-388219d6f47c@isocpp.org>
 <CAPCFJdR-m+CdMD4LqBNu5jkfHiGBsLBEGSpJPb0o+9FjnD655w@mail.gmail.com>
 <cb9047c7-0859-450f-85ca-6de1edb40b25@isocpp.org> <ec8b141e-c7cb-403d-9639-42d879dae7da@isocpp.org>
 <38aee49f-8d37-451c-bef8-fd9d290c454d@isocpp.org> <pe6jo1$8fa$1@blaine.gmane.org>
 <393d1734-10f4-4f8c-8dfd-c1598a709203@isocpp.org> <e59d5db0-e3f8-4a86-9f29-7a07a1f793bc@isocpp.org>
 <9c62c391-1593-437d-b839-ce62472cf0ea@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="00000000000017afa7056d07014a"
X-Trace: blaine.gmane.org 1527251613 24354 195.159.176.226 (25 May 2018 12:33:33 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 25 May 2018 12:33:33 +0000 (UTC)
Cc: bop@gmb.dk
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDRYVJ6TVYBRBF4GUDMAKGQEQGDDSLA@isocpp.org Fri May 25 14:33:29 2018
Return-path: <std-proposals+bncBDRYVJ6TVYBRBF4GUDMAKGQEQGDDSLA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pl0-f72.google.com ([209.85.160.72])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDRYVJ6TVYBRBF4GUDMAKGQEQGDDSLA@isocpp.org>)
	id 1fMBuO-0006AG-Oi
	for gclcip-std-proposals@m.gmane.org; Fri, 25 May 2018 14:33:25 +0200
Original-Received: by mail-pl0-f72.google.com with SMTP id q16-v6sf2984814pls.15
        for <gclcip-std-proposals@m.gmane.org>; Fri, 25 May 2018 05:35:36 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1527251735; cv=pass;
        d=google.com; s=arc-20160816;
        b=rT2a9lFqP7M6+2mFcocrMiHmTudUQLJJazrP4ws1rbKYoN2Su4wUvJBOtiiHbJ1EGe
         l56Vq52tVyA0SZ7n4fdfyfGgShiDopHMPRi0boBov0SD95kLs8vTFEnVXeInHYgo12ES
         CUkcysSqnlUYVpCxg8He5xNLX1eYxBipyM5xrvHDsHy0k/RPfrknxqiFW/dCanDs4N5x
         eaZwFiYjZ9QN06jvJd20ZP8NagMGgMGvWj201IJ8uzM8Hanwg602ZqeVtyZ+4lA8QmU1
         NqYZao/N5/acpRaaSxGaPGwMxOQJMx+Jd8+n8LigBygqRyR3iy77bw8BafS7brLmyZY8
         uKTg==
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:cc:to:subject:message-id
         :date:from:references:in-reply-to:mime-version
         :arc-authentication-results:arc-message-signature:dkim-signature
         :arc-authentication-results;
        bh=NxhlVLAe7G3ClPT9ZfeNKA4I+Ukh0uGaFcf58ggMnV0=;
        b=S+Fd/1By4q5Q7qyxfUD3S+lCFz/uDp3pHEPcZ+zBG+HIvT8bLXN4sCCUq6YG5bgwdu
         T5Cn4FZW2FCasE00AGBZnFsfMvNGgl2+TlLw0C/y/yQvejF+EyznhZnqKnvRrLJPhiT7
         XMnuqtFX/AWsQ9XUjSFcnjy77cWatc2VB46BwvHpOu9dYdV8A82TNoziW15bFK2YUuns
         63kvMT8OgK8DWVgo0pzOAriirIFDfAALPSvVO7GV3ygvShY7mW9rFELX9DiXAvc6DkRl
         qTLQ9c75X3kvoGilessd9kDjnor4+6JljdVOCAa5k1lgOo5SRcsnRGRw3PuG58myR1b8
         60KQ==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=rS5vILdq;
       spf=pass (google.com: domain of gasper.azman@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=gasper.azman@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:in-reply-to:references:from:date:message-id:subject:to
         :cc: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=NxhlVLAe7G3ClPT9ZfeNKA4I+Ukh0uGaFcf58ggMnV0=;
        b=Qv5uo22RNIcEYoM6yvCGKSKum/hth6qoxpNU9pYBpgKf2N7NHRKX68kMWKls1rdfu5
         g02vEU5qJsm3h/Q4lxtk4D4XRTOrSmXyhxN7vceZqRalXTzBQnD38saeUhCKLMvOwYWg
         khRSnCUiO9mPjeLSP3UjuweG4Ey6LMyudfGohexEkPq0nI756O9okIT7TzRXmiAMbdzi
         gjR0U171taNV0AI4n69iNhT0Ed9DFc6ku3b6QccG7s2D3eMIlEoxc/NT1aN+T56QB2RD
         iaTrwv2iAhRhNXzTA98IrAgJpz0vp9/BKnX56V7gOOGb4EES3CnY99a+eJCPxU86DBEy
         COAg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:cc: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=NxhlVLAe7G3ClPT9ZfeNKA4I+Ukh0uGaFcf58ggMnV0=;
        b=cB35rLzjXkbD6j26vJj5H1ZKPrpOOPxlI+sMbDuEiIrI+QuZ+DLH7D04cyvfmwwsfI
         s1zTEfJ62f5g6OZ+RIymCcI9AHkew6ZPelR4akIpkxCVXkEf/R5v1GO3hHpSjcelPKa/
         WDnVlAe3lLDk2ykUV4/+8mmYgiPwBZ8I5+lN+SF4hXZLCMsRwVrzopRLbXvHYz0vv6f/
         o5rFFISKhfeRNmvEUGn4ZNXYF/11elbLtRc3mfid03cptsdTvkxSR7BwMufdZ4ogViJ6
         ggHKnGp0LARwFdFYj2AeSJM/qUbjokBYMNnFxKKSRrs6kL+RPGgttWU7XZrVyU43kwYd
         xSfA==
X-Gm-Message-State: ALKqPwetFx+Uw1OLMPQJSP0WsryfnbzQy4b9ZJezxPDdxn65I6n0wXn2
	9KxVJJcJ5sYSQKpWkcTszDGc+Q==
X-Google-Smtp-Source: AB8JxZr8cgSCY+7KlH4hxlB+S0YfQjgmeYC7lowxxDWtiGO90Ww1GNLu79RxHvBd9qhOuWhGdh9SfQ==
X-Received: by 2002:a63:755a:: with SMTP id f26-v6mr316147pgn.128.1527251735660;
        Fri, 25 May 2018 05:35:35 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:aa7:8090:: with SMTP id v16-v6ls6903608pff.10.gmail; Fri, 25
 May 2018 05:35:34 -0700 (PDT)
X-Received: by 2002:a65:4ecc:: with SMTP id w12-v6mr1873075pgq.214.1527251734585;
        Fri, 25 May 2018 05:35:34 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1527251734; cv=none;
        d=google.com; s=arc-20160816;
        b=WFKMKWNLBrQ0/I/hWIv0S4pSXOpW6L33zEdn+FT/k0OxsodHHm5rrm1ZvYY+4O8K53
         cG0/ey7wB/27DTmWLhEGMtDpqfINmEFaUDxIF0lUFl0V8OU3WRcL66GwAnmrA3x/BQhy
         4IviqJKd+j0tRDudXpOSZZn9H4dTfDNwGr2INAzr7Y0N7wFmv0fkrkwJwxlFZ7QXHr2K
         tbcYjMrsDrFUll3cxzNflkr1e3o6mTD2wPTieuSuZY6W6aGfQefKz1OrqimyUd7srUht
         r4nW668c3IrfQi6ZiZbP/YVrTSCgu/KubsxXzCIFiTmynXgvf/gsTb/mtq+6Ol1sxtS6
         MKgQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=cc:to:subject:message-id:date:from:references:in-reply-to
         :mime-version:dkim-signature:arc-authentication-results;
        bh=7o4bKgMsY9o8Am97dDpfAKoFmXbRVa7d7i/jzAA0a3A=;
        b=flGt0tJdzcGxMiJOLhfL9t04p6xFCy6627gxdXsF10yhirj5Knp+u5hf4q4NyIwA70
         /ZmlyrjXbo/ogm0I5IaOB69Bugbr8YmbC9wdPRb6evQSPdvavuFPvg3oZw/O5aAD1PPY
         smPpsEEK3u3VZ2tslesfU/3/r2xhvqenV/pDsWInG4t8OD80z0f87M2jIukEZzr7a1Op
         z6ktC5YM86p/s7jsEjp/S3laH2BTiNYAZu2bGwxPjnfW7wBKmw7FV06Tq+CbTxrx1Qst
         mJo7qvGpK46N/SJaDawzy41f+wpqf/VzC4s09WV96NrWWkxhzECHpEuhVoXn+T8NHLKe
         v9oQ==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=rS5vILdq;
       spf=pass (google.com: domain of gasper.azman@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=gasper.azman@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 q4-v6sor6858664pgf.377.2018.05.25.05.35.34
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Fri, 25 May 2018 05:35:34 -0700 (PDT)
Received-SPF: pass (google.com: domain of gasper.azman@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 2002:a65:628a:: with SMTP id f10-v6mr1903451pgv.6.1527251734079;
 Fri, 25 May 2018 05:35:34 -0700 (PDT)
Original-Received: by 2002:a17:90a:2364:0:0:0:0 with HTTP; Fri, 25 May 2018 05:35:13
 -0700 (PDT)
In-Reply-To: <9c62c391-1593-437d-b839-ce62472cf0ea@isocpp.org>
X-Original-Sender: gasper.azman@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=rS5vILdq;       spf=pass
 (google.com: domain of gasper.azman@gmail.com designates 209.85.220.41 as
 permitted sender) smtp.mailfrom=gasper.azman@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:38191
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/38191>

--00000000000017afa7056d07014a
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

So, Vlad, are you writing a paper?

G

On Fri, May 25, 2018 at 1:22 PM, 'Vlad from Moscow' via ISO C++ Standard -
Future Proposals <std-proposals@isocpp.org> wrote:

> In fact most of the member functions that create a new representation of
> the object of the class template std::basic_string have an overload that
> uses iterators as for example assign, append, insert, replace, erase. And
> only the member function substr does not use iterators..
>
> =D1=87=D0=B5=D1=82=D0=B2=D0=B5=D1=80=D0=B3, 24 =D0=BC=D0=B0=D1=8F 2018 =
=D0=B3., 20:18:39 UTC+3 =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=
=82=D0=B5=D0=BB=D1=8C Nicol Bolas =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=
=BB:
>>
>> On Thursday, May 24, 2018 at 11:28:32 AM UTC-4, Vlad from Moscow wrote:
>>>
>>> I do not think that adding the overloads of substr makes the class more
>>> complex.
>>>
>>
>> I'm sure every proposal that added some functions to `basic_string` said
>> the same thing. That kind of thinking is precisely how you get bloated
>> interfaces.
>>
>> Those grains of seemingly irrelevant sand eventually add up to a desert.
>>
>> That being said, I don't think `basic_string`'s interface is
>> *unnecessarily* bloated. I find that (most of) those functions are
>> essential, but mainly because there are no equivalent algorithms that ca=
n
>> do those jobs anywhere nearly as conveniently, clearly, and effectively.
>>
>> `str.find("foo"sv)` is hundreds of times more digestible than `auto look
>> =3D "foo"sv; std::search(str.begin(), str.end(), look.begin(), look.end(=
));`
>> Range TS gives us `std::search(str, "foo"sv)`, which is pretty reasonabl=
e.
>>
> --
> 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/9c62c391-1593-437d-
> b839-ce62472cf0ea%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9c62c391-15=
93-437d-b839-ce62472cf0ea%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoot=
er>
> .
>

--=20
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 e=
mail 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/CAANG%3DkVyVpTzS74BYKin6yEpvwh1AXCyS1sF53ck9i%2B=
J%2BdvqMQ%40mail.gmail.com.

--00000000000017afa7056d07014a
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">So, Vlad, are you writing a paper?<div><br></div><div>G</d=
iv></div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Fri, =
May 25, 2018 at 1:22 PM, &#39;Vlad from Moscow&#39; via ISO C++ Standard - =
Future Proposals <span dir=3D"ltr">&lt;<a href=3D"mailto:std-proposals@isoc=
pp.org" target=3D"_blank">std-proposals@isocpp.org</a>&gt;</span> wrote:<br=
><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1=
px #ccc solid;padding-left:1ex"><div dir=3D"ltr">In fact most of the member=
 functions that create a new representation of the object of the class temp=
late std::basic_string have an overload that uses iterators as for example =
assign, append, insert, replace, erase. And only the member function substr=
 does not use iterators..<br><br>=D1=87=D0=B5=D1=82=D0=B2=D0=B5=D1=80=D0=B3=
, 24 =D0=BC=D0=B0=D1=8F 2018 =D0=B3., 20:18:39 UTC+3 =D0=BF=D0=BE=D0=BB=D1=
=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Nicol Bolas =D0=BD=D0=
=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:<span class=3D"gmail-"><blockquote class=
=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg=
b(204,204,204);padding-left:1ex"><div dir=3D"ltr">On Thursday, May 24, 2018=
 at 11:28:32 AM UTC-4, Vlad from Moscow wrote:<blockquote class=3D"gmail_qu=
ote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,20=
4);padding-left:1ex"><div dir=3D"ltr">I do not think that adding the overlo=
ads of substr makes the class more complex.<br></div></blockquote><div><br>=
</div><div>I&#39;m sure every proposal that added some functions to `basic_=
string` said the same thing. That kind of thinking is precisely how you get=
 bloated interfaces.</div><div><br></div><div>Those grains of seemingly irr=
elevant sand eventually add up to a desert.</div><div><br></div><div>That b=
eing said, I don&#39;t think `basic_string`&#39;s interface is <i>unnecessa=
rily</i> bloated. I find that (most of) those functions are essential, but =
mainly because there are no equivalent algorithms that can do those jobs an=
ywhere nearly as conveniently, clearly, and effectively.</div><div><br></di=
v><div>`str.find(&quot;foo&quot;sv)` is hundreds of times more digestible t=
han `auto look =3D &quot;foo&quot;sv; std::search(str.begin(), str.end(), l=
ook.begin(), look.end());` Range TS gives us `std::search(str, &quot;foo&qu=
ot;sv)`, which is pretty reasonable.<br></div></div></blockquote></span></d=
iv><span class=3D"gmail-">

<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@<wbr>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></span>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/9c62c391-1593-437d-b839-ce62472cf0ea%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/9c62=
c391-1593-437d-<wbr>b839-ce62472cf0ea%40isocpp.org</a><wbr>.<br>
</blockquote></div><br></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/CAANG%3DkVyVpTzS74BYKin6yEpvwh1AXCyS1=
sF53ck9i%2BJ%2BdvqMQ%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfoote=
r">https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAANG%3DkVy=
VpTzS74BYKin6yEpvwh1AXCyS1sF53ck9i%2BJ%2BdvqMQ%40mail.gmail.com</a>.<br />

--00000000000017afa7056d07014a--

.
