From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philippe Vaucher Newsgroups: gmane.emacs.devel Subject: Re: RFC: String interpolation Date: Thu, 8 Dec 2016 10:05:03 +0100 Message-ID: References: <51825111-ace4-f750-4077-026a3b648d27@gmail.com> <87twaex1bm.fsf@fastmail.fm> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113d0ad4a6cead054321f0e3 X-Trace: blaine.gmane.org 1481188040 18300 195.159.176.226 (8 Dec 2016 09:07:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 8 Dec 2016 09:07:20 +0000 (UTC) Cc: Andreas Schwab , =?UTF-8?B?Q2zDqW1lbnQgUGl0LS1DbGF1ZGVs?= , Emacs developers To: Joost Kremers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 08 10:07:15 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cEufZ-0003tP-Vj for ged-emacs-devel@m.gmane.org; Thu, 08 Dec 2016 10:07:14 +0100 Original-Received: from localhost ([::1]:44989 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cEufd-0001Eq-VY for ged-emacs-devel@m.gmane.org; Thu, 08 Dec 2016 04:07:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47014) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cEuf1-0001DR-Po for emacs-devel@gnu.org; Thu, 08 Dec 2016 04:06:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cEuew-0000mm-OE for emacs-devel@gnu.org; Thu, 08 Dec 2016 04:06:39 -0500 Original-Received: from mail-ua0-f169.google.com ([209.85.217.169]:33129) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cEuew-0000m6-Jd for emacs-devel@gnu.org; Thu, 08 Dec 2016 04:06:34 -0500 Original-Received: by mail-ua0-f169.google.com with SMTP id 20so442057485uak.0 for ; Thu, 08 Dec 2016 01:06:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=X5yW8wtem4gKLCvXtLJPMYFTfPXB2DP2GMxYFLhIgpQ=; b=ZsRCkNg4J1OQe4f1P6qQ0oJi49ZeUTEnzymZXG7dTkqvMWJBOuL7RfnG3brPHy75OG zmLey0JtMSqE6jsHA4NZkNKtIABkdHAjdUoPtWGxpNCQ5Mjtrxo02N38jduguPRvZR/v vg318th7vlY8wy776bl4VGxcg9nk6g73k0vnRgOHoqvwuwJYRs5s/vSK9bdhOP+XPzc0 qP9f6G7r4Rjk2kYKH4bPSZp4/Hf6L7SL9yaVFj3M4Vvi+3Brc8WvT0YZqJ1dGO2o1Fxt hrifOIwIfBrJKqLCk1AHToXkZ6HDTJnFLFWHZPo+EhqdwX0bG8dqWStlkghojVL5X8Hp A4pQ== 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:from:date :message-id:subject:to:cc; bh=X5yW8wtem4gKLCvXtLJPMYFTfPXB2DP2GMxYFLhIgpQ=; b=WZXAet6kUxWeBWLeVc0EwrVFS6KHE94Hm5sfs1kYHeNeq/Jtb4E5OmdBR0g6XLqOmA WK3ud4W3pfy7bsHpTqQfu2BGgUIZ66Bf2KmcP09TDXa1i2yMN66acDe74KGuVT4Y/Bm3 lJSb/vQyRvFRcAqgpHH8RxTEShlCpCe7TOeWi0f0vhbUWvC46B+O1YX0mUdYgzQXD4ev ehgDMvKnj6jOSgk+YpzjK5ttPctarHG3USBzyou0C472c5nWdRuIFvQ3KCgXIh4PTHUx jDfSUGgTB50gk97V9Sg9nKDrfsP5IlrgUsfwd/+OK13FAz/DkBhlHu2ZGSesr9kwcn53 GVYQ== X-Gm-Message-State: AKaTC03cMdXcc5gNGxAjRdwQi5Mqb8oyxERA6Wa1UwEUdAjjIiO2dhCqazpqw2j3R31FrG6tWFs2ybYVB9cSLQ== X-Received: by 10.176.0.87 with SMTP id 81mr46985901uai.73.1481187933997; Thu, 08 Dec 2016 01:05:33 -0800 (PST) Original-Received: by 10.103.125.149 with HTTP; Thu, 8 Dec 2016 01:05:03 -0800 (PST) In-Reply-To: <87twaex1bm.fsf@fastmail.fm> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.217.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:210131 Archived-At: --001a113d0ad4a6cead054321f0e3 Content-Type: text/plain; charset=UTF-8 > > (format "The value is %.2f." (1+ value)) >> > > Well, yes, but if you have a longish string and more than two-three values > to fill, it can be difficult to see what value goes where and what the > resulting string will look like. > In some situations string interpolations are cleaner, in others printf-like formatting is more readable... it can really go both ways. *In general* I prefer printf-like formatting tho. There's an argument for supporting both in that reguard. Philippe --001a113d0ad4a6cead054321f0e3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
= (format "The value is %.2f." (1+ value))

Well, yes, but if you have a longish string and more than two-three values = to fill, it can be difficult to see what value goes where and what the resu= lting string will look like.

In some si= tuations string interpolations are cleaner, in others printf-like formattin= g is more readable... it can really go both ways. *In general* I prefer pri= ntf-like formatting tho.

There's an argument f= or supporting both in that reguard.

Philippe
=
--001a113d0ad4a6cead054321f0e3--