220 20538 <CAB+4KHL9Zq4yh-zcFV_RYZTqEmP1hzs0JO8b2PWRJi3EH6kPjA@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: Re: Rough Draft Proposal of Interpolated String Literals
Date: Mon, 21 Sep 2015 00:44:29 +0200
Lines: 134
Approved: news@gmane.org
Message-ID: <CAB+4KHL9Zq4yh-zcFV_RYZTqEmP1hzs0JO8b2PWRJi3EH6kPjA@mail.gmail.com>
References: <CAB+4KHKxwEPXSFScU-FjeUL=yQFZWGfm6uk5fbh1+9bfScL_2Q@mail.gmail.com>
	<680cc175-12e5-4027-aa9d-ade90f00445e@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=f46d0418270cfc13890520358106
X-Trace: ger.gmane.org 1442789072 28264 80.91.229.3 (20 Sep 2015 22:44:32 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sun, 20 Sep 2015 22:44:32 +0000 (UTC)
To: "std-proposals@isocpp.org" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBD5KHQXXWYPRBTXN7SXQKGQEL7445OQ@isocpp.org Mon Sep 21 00:44:32 2015
Return-path: <std-proposals+bncBD5KHQXXWYPRBTXN7SXQKGQEL7445OQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-la0-f69.google.com ([209.85.215.69])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBD5KHQXXWYPRBTXN7SXQKGQEL7445OQ@isocpp.org>)
	id 1ZdnLT-0007Px-R8
	for gclcip-std-proposals@m.gmane.org; Mon, 21 Sep 2015 00:44:31 +0200
Original-Received: by lagj9 with SMTP id j9sf37015326lag.0
        for <gclcip-std-proposals@m.gmane.org>; Sun, 20 Sep 2015 15:44:31 -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=YLTUPDbrE+K31mgSghDHgF0FQdjvP1p2wNEogHfoFtg=;
        b=m4QTXbHQLbVbEyumi029+VlOB+VxKeygECgrZyfkhH/h2nS/7SAk7eb98jWKVydY0e
         s43IQ0IdGeEvRZFw9i3V124tsERgFbN1znxdqPdnR9KzFEZhtCDhEyel72ygtVx/yTsP
         NxSk5Qnj6bhl0TQiyqSLXogmxeSWgNip+lTNgctOWhr0/r4Ty/i1hHA/Ftv7xR7jMI9y
         pgDrYgbFW3cQas6qBreB/qwkukBdgGo2XD+ghSaBZNx0r+1Bqrua43M/d+ttsXnVAceI
         e76wzzT60QXiNBBasw7bj2tNsC7qBboSzcKgtQ0LXxwy7jznlbzgmpvCKQXKY41ujNpB
         OftA==
X-Gm-Message-State: ALoCoQmWHWsBEH9U0uBjKCUrdfXQh71QwC2FJzTKE49lsKU0F8g79lSQBdEYdo3AVna+bkjQDgJS
X-Received: by 10.194.109.233 with SMTP id hv9mr2705880wjb.1.1442789071003;
        Sun, 20 Sep 2015 15:44:31 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.107.199 with SMTP id he7ls572361wib.16.canary; Sun, 20 Sep
 2015 15:44:30 -0700 (PDT)
X-Received: by 10.180.74.47 with SMTP id q15mr10681694wiv.73.1442789070078;
        Sun, 20 Sep 2015 15:44:30 -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 m18si13447998wij.54.2015.09.20.15.44.30
        for <std-proposals@isocpp.org>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Sun, 20 Sep 2015 15:44:30 -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 wicfx3 with SMTP id fx3so89092857wic.0
        for <std-proposals@isocpp.org>; Sun, 20 Sep 2015 15:44:29 -0700 (PDT)
X-Received: by 10.180.104.40 with SMTP id gb8mr10202098wib.17.1442789069688;
 Sun, 20 Sep 2015 15:44:29 -0700 (PDT)
Original-Received: by 10.28.73.137 with HTTP; Sun, 20 Sep 2015 15:44:29 -0700 (PDT)
In-Reply-To: <680cc175-12e5-4027-aa9d-ade90f00445e@isocpp.org>
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:20538
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/20538>

--f46d0418270cfc13890520358106
Content-Type: text/plain; charset=UTF-8

As proposed, you can.  We call them embedded general expressions:

   std::cout F"# #{a} + #{b} = #{a + b}";
   // Prints "1 + 2 = 3"

As does:

   std::cout F"# #a + #b = #{a + b}";
   // Prints "1 + 2 = 3"


On Mon, Sep 21, 2015 at 12:36 AM, <jgottman6@gmail.com> wrote:

> One major problem with this is that it is only possible to interpolate
> named variables, not arbitrary values.  This means that it would be
> impossible to interpolate an element of an array or the result of a
> function call.  I would prefer something like Ruby's #{ .. }  interpolation
> syntax, where you can do something like
>
> a = 1
> b = 2
> puts "#{a} + #{b} = #{a + b}" # Prints "1 + 2 = 3"
>
>
> Joe Gottman
>
> On Friday, September 18, 2015 at 4:22:01 PM UTC-4, Andrew Tomazos wrote:
>>
>> Please find attached a very very rough draft of a proposal entitled
>> "Interpolated String Literals".
>>
>> Mainly after encouragement or discouragement, and any high-level thoughts
>> you might have about it.
>>
>> --
>
> ---
> 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/.
>

-- 

--- 
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/.

--f46d0418270cfc13890520358106
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">As proposed, you can.=C2=A0 We call them embedded general =
expressions:<div><br></div><div>=C2=A0 =C2=A0std::cout F&quot;# #{a} + #{b}=
 =3D #{a + b}&quot;;<br><div class=3D"gmail_extra">=C2=A0 =C2=A0//=C2=A0Pri=
nts &quot;1 + 2 =3D 3&quot;</div><div class=3D"gmail_extra"><br></div><div =
class=3D"gmail_extra">As does:</div><div class=3D"gmail_extra"><br></div><d=
iv class=3D"gmail_extra">=C2=A0 =C2=A0std::cout F&quot;# #a + #b =3D #{a + =
b}&quot;;</div><div><div class=3D"gmail_extra">=C2=A0 =C2=A0//=C2=A0Prints =
&quot;1 + 2 =3D 3&quot;</div></div><div><br></div><div class=3D"gmail_extra=
"><br><div class=3D"gmail_quote">On Mon, Sep 21, 2015 at 12:36 AM,  <span d=
ir=3D"ltr">&lt;<a href=3D"mailto:jgottman6@gmail.com" target=3D"_blank">jgo=
ttman6@gmail.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote"=
 style=3D"margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:=
rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir=3D"ltr"=
>One major problem with this is that it is only possible to interpolate nam=
ed variables, not arbitrary values.=C2=A0 This means that it would be impos=
sible to interpolate an element of an array or the result of a function cal=
l.=C2=A0 I would prefer something like Ruby&#39;s #{ .. }=C2=A0 interpolati=
on syntax, where you can do something like<br><br><div style=3D"border:1px =
solid rgb(187,187,187);word-wrap:break-word;background-color:rgb(250,250,25=
0)"><code><div><span style=3D"color:rgb(0,0,0)">a </span><span style=3D"col=
or:rgb(102,102,0)">=3D</span><span style=3D"color:rgb(0,0,0)"> </span><span=
 style=3D"color:rgb(0,102,102)">1</span><span style=3D"color:rgb(0,0,0)"><b=
r>b </span><span style=3D"color:rgb(102,102,0)">=3D</span><span style=3D"co=
lor:rgb(0,0,0)"> </span><span style=3D"color:rgb(0,102,102)">2</span><span =
style=3D"color:rgb(0,0,0)"><br>puts </span><span style=3D"color:rgb(0,136,0=
)">&quot;#{a} + #{b} =3D #{a + b}&quot;</span><span style=3D"color:rgb(0,0,=
0)"> </span><span style=3D"color:rgb(136,0,0)"># Prints &quot;1 + 2 =3D 3&q=
uot;</span><span style=3D"color:rgb(0,0,0)"><br></span></div></code></div><=
br><br>Joe Gottman<span class=3D""><br><br>On Friday, September 18, 2015 at=
 4:22:01 PM UTC-4, Andrew Tomazos wrote:<blockquote class=3D"gmail_quote" s=
tyle=3D"margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rg=
b(204,204,204);border-left-style:solid;padding-left:1ex"><div dir=3D"ltr">P=
lease find attached a very very rough draft of a proposal entitled &quot;In=
terpolated String Literals&quot;.<div><br></div><div>Mainly after encourage=
ment or discouragement, and any high-level thoughts you might have about it=
..</div><div><br></div></div>
</blockquote></span></div><div class=3D""><div class=3D"h5">

<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>
</div></div></blockquote></div><br></div></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 />

--f46d0418270cfc13890520358106--

.
