220 20534 <043C43B5-72C9-4136-8D2F-2A3D745B2975@gmail.com> article
Path: news.gmane.org!not-for-mail
From: Miro Knejp <miro.knejp@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Rough Draft Proposal of Interpolated String Literals
Date: Sun, 20 Sep 2015 23:14:51 +0200
Lines: 45
Approved: news@gmane.org
Message-ID: <043C43B5-72C9-4136-8D2F-2A3D745B2975@gmail.com>
References: <CAB+4KHKxwEPXSFScU-FjeUL=yQFZWGfm6uk5fbh1+9bfScL_2Q@mail.gmail.com> <mtn6lu$3mr$1@ger.gmane.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\))
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Trace: ger.gmane.org 1442783701 18838 80.91.229.3 (20 Sep 2015 21:15:01 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sun, 20 Sep 2015 21:15:01 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC6ONSXJ54LBBTWD7SXQKGQEPDB4TXI@isocpp.org Sun Sep 20 23:14:56 2015
Return-path: <std-proposals+bncBC6ONSXJ54LBBTWD7SXQKGQEPDB4TXI@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+bncBC6ONSXJ54LBBTWD7SXQKGQEPDB4TXI@isocpp.org>)
	id 1Zdlwl-00066a-QV
	for gclcip-std-proposals@m.gmane.org; Sun, 20 Sep 2015 23:14:55 +0200
Original-Received: by lbot4 with SMTP id t4sf32614608lbo.0
        for <gclcip-std-proposals@m.gmane.org>; Sun, 20 Sep 2015 14:14:55 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:content-type:mime-version:subject:from
         :in-reply-to:date:content-transfer-encoding:message-id:references:to
         :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=cYudRlHnyd16IG0SPnl98PHyk8ZQ6V1fBPmSnbzowXU=;
        b=j8qYB0fjNHiIYcCQyrKy5CgGOouQQbpfCTJMIl4JZr+OzmZKpVZoQlsnQoqZI1i9zp
         swHBhXJNeRJK8CIjDRGE7GnL446iCiezhqFgVHbZ57hFBZ+/OHSqgAvUe5bqNGmL7UMR
         Gbmia1L09stebtO15o189E0g8vx5HNl+BVDFQawhxeb1n9jlHvfPdA0UZDVEPEhfVsJP
         pWQNP2tlkMwL+GNzkrJz9vCZhJt3NDrmq3FJ53XVwH+fGsABz6uJzX5Dub8OmalAy61W
         QQPNJ1mcQ37qKyewllr1aCdk0/UqC6iKLund6bcDqwFQdo3CjK5EGd28FFX9uL1MjX6B 
X-Gm-Message-State: ALoCoQnRoUtOwrwZRziuRLPADpdRIAvWN+kg8HGeNjLfezvtFQGw76NmmXOxoA/WHU7ozBhyTn6l
X-Received: by 10.112.26.212 with SMTP id n20mr2685952lbg.2.1442783695282;
        Sun, 20 Sep 2015 14:14:55 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.211.50 with SMTP id mz18ls506389wic.25.canary; Sun, 20 Sep
 2015 14:14:54 -0700 (PDT)
X-Received: by 10.194.48.102 with SMTP id k6mr21804764wjn.124.1442783694423;
        Sun, 20 Sep 2015 14:14:54 -0700 (PDT)
Original-Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com. [2a00:1450:400c:c05::22c])
        by mx.google.com with ESMTPS id e5si13042861wiy.59.2015.09.20.14.14.54
        for <std-proposals@isocpp.org>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Sun, 20 Sep 2015 14:14:54 -0700 (PDT)
Received-SPF: pass (google.com: domain of miro.knejp@gmail.com designates 2a00:1450:400c:c05::22c as permitted sender) client-ip=2a00:1450:400c:c05::22c;
Original-Received: by wicge5 with SMTP id ge5so92100451wic.0
        for <std-proposals@isocpp.org>; Sun, 20 Sep 2015 14:14:54 -0700 (PDT)
X-Received: by 10.194.87.102 with SMTP id w6mr18710032wjz.111.1442783694161;
        Sun, 20 Sep 2015 14:14:54 -0700 (PDT)
Original-Received: from [192.168.184.201] ([84.18.150.172])
        by smtp.gmail.com with ESMTPSA id f17sm20713996wjn.38.2015.09.20.14.14.53
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Sun, 20 Sep 2015 14:14:53 -0700 (PDT)
In-Reply-To: <mtn6lu$3mr$1@ger.gmane.org>
X-Mailer: Apple Mail (2.2104)
X-Original-Sender: miro.knejp@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of miro.knejp@gmail.com designates 2a00:1450:400c:c05::22c as
 permitted sender) smtp.mailfrom=miro.knejp@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:20534
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/20534>


> On 20 Sep 2015, at 22:58 , Jim Porter <jvp4846@g.rit.edu> wrote:
>=20
> On 9/18/2015 3:21 PM, Andrew Tomazos wrote:
>> Please find attached a very very rough draft of a proposal entitled
>> "Interpolated String Literals".
>>=20
>> Mainly after encouragement or discouragement, and any high-level
>> thoughts you might have about it.
>=20
> I'm not sure it's *really* necessary to do this as a language extension, =
rather than just as a library. Granted, there are nice aspects of doing it =
as a language feature (you can use expressions in-place and they get expand=
ed as you'd expect), but given the choice, I think I'd rather see something=
 like printf. That could be done as a library-only addition, and would make=
 it fairly easy for folks to design a similar interface with slightly-diffe=
rent syntax if they had different needs.
>=20
> The specification also doesn't seem to say anything about the part that I=
 think is most important for format specifiers: formatting options. I/O str=
eams' manipulators are a pain to use, since they're verbose, and unlike pri=
ntf, they don't turn themselves off in most cases; hence why Boost added I/=
O state savers. I'd much rather see a proposal that improves format specifi=
ers. However, I think a proposal for this would end up looking more like pr=
intf's placeholder-style, since it seems fairly difficult to add format spe=
cifiers to an in-place style (at least, if you want to maintain readability=
).
If you need format specifiers or a runtime-provided format string then stri=
ng interpolation is not the tool you=E2=80=99re looking for. String interpo=
lation does not replace formatting and vice versa. String interpolation is =
used when the tokenization and formatting rules are determined at compile t=
ime, where it is a convenient syntax to replace a bunch of function or oper=
ator call boilerplate.

--=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/.

.
