From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: RFC: String interpolation Date: Sat, 10 Dec 2016 10:49:59 -0500 Message-ID: <76c9c475-0180-aa49-3d4a-006d4e3f943c@gmail.com> References: <51825111-ace4-f750-4077-026a3b648d27@gmail.com> <8737hwnc52.fsf@lifelogs.com> <8c117f5c-209a-97d8-79ce-a78f707f0545@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="c4UV8SxaTdtcNk5c30HhTiKL7n6kLpmBf" X-Trace: blaine.gmane.org 1481385041 12646 195.159.176.226 (10 Dec 2016 15:50:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 10 Dec 2016 15:50:41 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 10 16:50:29 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 1cFjuu-0001JR-W7 for ged-emacs-devel@m.gmane.org; Sat, 10 Dec 2016 16:50:29 +0100 Original-Received: from localhost ([::1]:52146 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cFjuy-0006ko-Up for ged-emacs-devel@m.gmane.org; Sat, 10 Dec 2016 10:50:32 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37018) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cFjum-0006jR-5S for emacs-devel@gnu.org; Sat, 10 Dec 2016 10:50:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cFjuj-0005Eh-4K for emacs-devel@gnu.org; Sat, 10 Dec 2016 10:50:20 -0500 Original-Received: from mout.kundenserver.de ([217.72.192.73]:54249) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cFjui-0005EI-PA for emacs-devel@gnu.org; Sat, 10 Dec 2016 10:50:17 -0500 Original-Received: from [18.26.2.123] ([18.26.2.123]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.184]) with ESMTPSA (Nemesis) id 0Lu5Kw-1cfl4c0X9q-011W9u; Sat, 10 Dec 2016 16:50:12 +0100 In-Reply-To: X-Provags-ID: V03:K0:VvhFgW3rcJmdpNOkdPfmVf56BjZMzNCRAnM/MIdTWGIm6qhNrqf hGbC1tpOG32H0kmlYpw56AAkMs5Y/aukstc2zjyKYhV6wA/JstDXjzfSoHxupSV7G09mV27 FMl8gOwmia2oh5Xlmm+ZD/XPSzeAjak1JeldxzV/SOJHUakN0CtcIRzmlz87cTogTGxqUyB zB3x4OIu1K09LNraXiYSQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:K8BryeSG55Y=:ZU8h16OKKmQ0xd+x+ltjpF jtnPvmh6/x+dBk0JFUBYKaMoKbDDJu63J4mf8rcUljx8G9AA6ZQjQizOqhoIaFehwl1PCbuYL VgEB9gPYniZLft6u6Cpl8ot2kE4EAASeaOWitKripvASOPugdsQv4hdrrFNWX3ukp/XGW5VxN 1Z6haek3ih558EQusQ78I8vJ/0LTTVFT5Pjkz7mwY1NqPAKwL1VkGZlwtw7bvjCayTKmY0tOn 2qxv8BIOV1t5qXbsRNYadoktBJUzXMFDXw8PbMselvMgg57kjNk7GVbtxDIypRYaeE/9b6EZ/ JUdFoeriLFUVUVE2oNuu1OrVyt33lpoGJ4syFIDHl73abd/UmXbAbTBCbdkbgXTyP93cmXjSA P4Grmauw7eOajBOdzU7fK3kovWrR8FSEGyxggoTiFBMufaAAEao8pfmvjCj/OdodAwtGUx11S xaFbe8y0zctKxKfduJGEoEkAoccafBbVpv+imBdEik3JI+YWF+hJkGwpNiRDxwQcVtZf5/XZV rsU39ihO0GDc1KhZUBaBjpAYkPA/tyC18HV4GMHzAmR2UYvCzph7lhiK8nDEvsCOdZul3I/DE YnBKjR4Th/68Davg2dc/GuTUIOmaRybBO0Q6yvzr6iTA5h0T6ThjnRegQDQCBHLPOMo//iZus qKEQA5/r32GTK0L7aDZ6Esufst7R7mzQOitpK1p7Ddy9MltayuT+6NgLKPxnhOEz8Qsg= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.72.192.73 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:210233 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --c4UV8SxaTdtcNk5c30HhTiKL7n6kLpmBf Content-Type: multipart/mixed; boundary="nglTr6nP50XiK531ERk5FPuR5cF4ecPem"; protected-headers="v1" From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= To: Lars Ingebrigtsen Cc: emacs-devel@gnu.org Message-ID: <76c9c475-0180-aa49-3d4a-006d4e3f943c@gmail.com> Subject: Re: RFC: String interpolation References: <51825111-ace4-f750-4077-026a3b648d27@gmail.com> <8737hwnc52.fsf@lifelogs.com> <8c117f5c-209a-97d8-79ce-a78f707f0545@gmail.com> In-Reply-To: --nglTr6nP50XiK531ERk5FPuR5cF4ecPem Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2016-12-10 10:39, Lars Ingebrigtsen wrote: > As Ted alluded to, there's a different, template based method that I > think is more promising and is growing more popular in newer languages.= I don't know: Python has had it for a while, no one uses it, and they are= now introducing interpolation=E2=80=A6 > (with-format ((zot "foo") > (thing (funcall '+ 3.42423 4))) > "This is %{thing}.2f and %{zot}ss") This looks fine too, but the repetition bothers me (I don't really see wh= at benefit there is to naming all arguments). So I still find "This is %(funcall '+ 3.42423 4).2f and "foo"s" more readable. But in any case, what you're suggesting is just a limited form of interpo= lation, right? IIUC it's actually already offered in s.el. With the fmt = that I suggested, you'd write this: (let ((zot "foo") (thing (funcall '+ 3.42423 4))) (fmt "This is $[%.2s]{thing} and ${zot}s")) Or would with-format behave differently? --nglTr6nP50XiK531ERk5FPuR5cF4ecPem-- --c4UV8SxaTdtcNk5c30HhTiKL7n6kLpmBf Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYTCQnAAoJEPqg+cTm90wj0BMP/A19ZLHPKbFWDAUeK07bDRxW 1x42vNvvAaZa2G4Vt0EhS8r4VjR5pRkZVX4lYfCKexRceNgz+J8U6APVcD7ukJ6a k/dl7wWVbjoc0Z6l7hL/UmVuS1bAs81U98XVeFq0jELo76pyGwtvwrazR0/2Hn2x BKx3N75m+u9iRYwJnli9wYkfhLQFrhTn2IyPYok6ymGK2+MlgmidRwqyFtkWCOMU UJcOmXDS74MS17subWLMGAZaNabuizrKRKeIe67O7KfBT07/ySWYg1GGBFcmUiwf hF1tmlQnMfpi9f2iSeb/qmzEReWUlp4up1r5ecd50dhvyiGyJ3cOmWunkCldL4Rp JAYw91WX8dZdEjA5X+0DjONR5NGHiJ4VaH3A1pGAbOWcTtIrnBNIi1tfiM12GRiz UUhxrRrI01mB7EMIa6MeCmEHBMtaVZNVScbDJ0XoWeR1SXxN4SLDD5jb9vk2ibkW v3uOUL5vU1XM1VY9PAG1h04aEsgQfUXvCU8no49+1gdONJvgRCZ/0CfuYFax4e7d DE/tjr6RSXEUFRpli3zhsvYt9zqqpsPdS+JXzTpFNAj9LqNkl+qCLSUtV5wB1dK0 iAWiSzaK8YGCwe+dECb/M7xGBfKEzxksU2a5O2GLXG2oz4Hao/xAkb7fOkxkxgAB 09ivywarQj7x2ws1/9qV =OB5s -----END PGP SIGNATURE----- --c4UV8SxaTdtcNk5c30HhTiKL7n6kLpmBf--