220 20499 <CAB+4KHKYtHm-b8wShyGV_v+Gk5aTEQm0Cap+VwSaXKnC5p1AhA@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Andrew Tomazos <andrewtomazos@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Rough Draft Proposal of Interpolated String Literals
Date: Fri, 18 Sep 2015 23:26:02 +0200
Lines: 165
Approved: news@gmane.org
Message-ID: <CAB+4KHKYtHm-b8wShyGV_v+Gk5aTEQm0Cap+VwSaXKnC5p1AhA@mail.gmail.com>
References: <CAB+4KHKxwEPXSFScU-FjeUL=yQFZWGfm6uk5fbh1+9bfScL_2Q@mail.gmail.com>
	<CAKiZDp3_oBHm_L=3RDv2ProyDOJdM6e-=p8zPUDTOA6jGUF4Cw@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a11c26816b9f1e905200c2d05
X-Trace: ger.gmane.org 1442611565 1406 80.91.229.3 (18 Sep 2015 21:26:05 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 18 Sep 2015 21:26:05 +0000 (UTC)
To: "std-proposals@isocpp.org" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBD5KHQXXWYPRB24C6KXQKGQEWQB3UEI@isocpp.org Fri Sep 18 23:26:05 2015
Return-path: <std-proposals+bncBD5KHQXXWYPRB24C6KXQKGQEWQB3UEI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lb0-f200.google.com ([209.85.217.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBD5KHQXXWYPRB24C6KXQKGQEWQB3UEI@isocpp.org>)
	id 1Zd3AS-0004rS-GZ
	for gclcip-std-proposals@m.gmane.org; Fri, 18 Sep 2015 23:26:04 +0200
Original-Received: by lbot4 with SMTP id t4sf21205289lbo.0
        for <gclcip-std-proposals@m.gmane.org>; Fri, 18 Sep 2015 14:26:03 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:date
         :message-id:subject:from:to:content-type: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=O8IOk9baCPer7i5qrzI8hzTtUMOdIKHO1h2nCCr0haM=;
        b=CFZQ2q9lLWtThN77aVfSAgGShfbVzl08tUZs+Bk3ROBvyJyWJyqVvvMZEuS3BmY5IX
         tkSou0c4Mvaq14bW24uuhil/zy0VOseGZ26IBXAt2auKcJywAcOlnEUgnlAox+3e6rSJ
         bVeripijk1FmJFG8HfXByAtkeSxALF31kuWOz4D7tljTVjCMwtvn1/inqHKCd7xBZs+L
         JiWGcGx7dJbA53VWRapnek8Q0FckxuAMV+AAPw1LwSOLKBzcJjEt5P9jPRHMF06ha6+G
         2NERXgZCSc+YXxBq4ZTX8lCdsIvzSflOB0gGclf4FN8GTar4nhL3QbnntpHsUIq40EzH
         R24w==
X-Gm-Message-State: ALoCoQmheJuia9v7zM67cmIJKK/JtN6/X749Q4ns8wlpYZNcYk2iAHqFtpGiSVS58+eO/Fz1AlhE
X-Received: by 10.112.189.105 with SMTP id gh9mr1279913lbc.16.1442611563916;
        Fri, 18 Sep 2015 14:26:03 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.8.229 with SMTP id u5ls267260wia.5.gmail; Fri, 18 Sep 2015
 14:26:02 -0700 (PDT)
X-Received: by 10.180.10.101 with SMTP id h5mr327513wib.22.1442611562801;
        Fri, 18 Sep 2015 14:26:02 -0700 (PDT)
Original-Received: from mail-wi0-x231.google.com (mail-wi0-x231.google.com. [2a00:1450:400c:c05::231])
        by mx.google.com with ESMTPS id gt4si121633wib.57.2015.09.18.14.26.02
        for <std-proposals@isocpp.org>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 18 Sep 2015 14:26:02 -0700 (PDT)
Received-SPF: pass (google.com: domain of andrewtomazos@gmail.com designates 2a00:1450:400c:c05::231 as permitted sender) client-ip=2a00:1450:400c:c05::231;
Original-Received: by wicgb1 with SMTP id gb1so48030963wic.1
        for <std-proposals@isocpp.org>; Fri, 18 Sep 2015 14:26:02 -0700 (PDT)
X-Received: by 10.180.10.101 with SMTP id h5mr327495wib.22.1442611562408; Fri,
 18 Sep 2015 14:26:02 -0700 (PDT)
Original-Received: by 10.28.73.137 with HTTP; Fri, 18 Sep 2015 14:26:02 -0700 (PDT)
In-Reply-To: <CAKiZDp3_oBHm_L=3RDv2ProyDOJdM6e-=p8zPUDTOA6jGUF4Cw@mail.gmail.com>
X-Original-Sender: andrewtomazos@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of andrewtomazos@gmail.com designates 2a00:1450:400c:c05::231 as
 permitted sender) smtp.mailfrom=andrewtomazos@gmail.com;       dkim=pass
 header.i=@gmail.com;       dmarc=pass (p=NONE 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: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://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>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:20499
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/20499>

--001a11c26816b9f1e905200c2d05
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Fri, Sep 18, 2015 at 10:45 PM, Patrice Roy <patricer@gmail.com> wrote:

> This would be useful (if it were possible to make it work without dynamic
> memory allocation)  for exception messages with variable components, as
> using a std::string for that purpose is unpleasant (risks of bad_alloc
> while building the exception and such), but I doubt this is feasible in
> practice. What would be the actual type of such an interpolated string?
> Would it reserve space for the sum of the worst-case for its =C2=ABvariab=
le
> components=C2=BB? How much space would be allocated for arbitrary classes=
 with
> implicit conversion to string or other niceties?
>
> So many questions... :)
>

As proposed an interpolated string literal isn't an expression as such, it
produces a sequence of tokens such that it will provide the operator and
RHS of an << binary expression.  The tokens include a mixture of ordinary
literal strings and expressions, just like in a normal << iostreams
statement.


> Cheers!
>
> 2015-09-18 16:21 GMT-04:00 Andrew Tomazos <andrewtomazos@gmail.com>:
>
>> Please find attached a very very rough draft of a proposal entitled
>> "Interpolated String Literals".
>>
>> Mainly after encouragement or discouragement, and any high-level thought=
s
>> you might have about it.
>>
>> --
>>
>> ---
>> You received this message because you are subscribed to the Google Group=
s
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n
>> email to std-proposals+unsubscribe@isocpp.org.
>> To post to this group, send email to std-proposals@isocpp.org.
>> Visit this group at
>> http://groups.google.com/a/isocpp.org/group/std-proposals/.
>>
>
> --
>
> ---
> 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.
> Visit this group at
> http://groups.google.com/a/isocpp.org/group/std-proposals/.
>

--=20

---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

--001a11c26816b9f1e905200c2d05
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On F=
ri, Sep 18, 2015 at 10:45 PM, Patrice Roy <span dir=3D"ltr">&lt;<a href=3D"=
mailto:patricer@gmail.com" target=3D"_blank">patricer@gmail.com</a>&gt;</sp=
an> wrote:<br><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>This wou=
ld be useful (if it were possible to make it work without dynamic memory al=
location)=C2=A0 for exception messages with variable components, as using a=
 std::string for that purpose is unpleasant (risks of bad_alloc while build=
ing the exception and such), but I doubt this is feasible in practice. What=
 would be the actual type of such an interpolated string? Would it reserve =
space for the sum of the worst-case for its =C2=ABvariable components=C2=BB=
? How much space would be allocated for arbitrary classes with implicit con=
version to string or other niceties?<br><br></div><div>So many questions...=
 :)</div></div></blockquote><div><br></div><div>As proposed an interpolated=
 string literal isn&#39;t an expression as such, it produces a sequence of =
tokens such that it will provide the operator and RHS of an &lt;&lt; binary=
 expression.=C2=A0 The tokens include a mixture of ordinary literal strings=
 and expressions, just like in a normal &lt;&lt; iostreams statement.</div>=
<div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8=
ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div></div=
>Cheers!<br></div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote"=
><span class=3D"">2015-09-18 16:21 GMT-04:00 Andrew Tomazos <span dir=3D"lt=
r">&lt;<a href=3D"mailto:andrewtomazos@gmail.com" target=3D"_blank">andrewt=
omazos@gmail.com</a>&gt;</span>:<br></span><blockquote class=3D"gmail_quote=
" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><=
span class=3D""><div dir=3D"ltr">Please find attached a very very rough dra=
ft of a proposal entitled &quot;Interpolated String Literals&quot;.<div><br=
></div><div>Mainly after encouragement or discouragement, and any high-leve=
l thoughts you might have about it.</div><span><font color=3D"#888888"><div=
><br></div></font></span></div></span><span class=3D"HOEnZb"><font color=3D=
"#888888"><span><font color=3D"#888888">

<p></p>

-- <br>
<br>
--- <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@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>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</font></span></font></span></blockquote></div><span class=3D"HOEnZb"><font=
 color=3D"#888888"><br></font></span></div><span class=3D"HOEnZb"><font col=
or=3D"#888888">

<p></p>

-- <br>
<br>
--- <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@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>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</font></span></blockquote></div><br></div></div>

<p></p>

-- <br />
<br />
--- <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 />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--001a11c26816b9f1e905200c2d05--

.
