From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!.POSTED!not-for-mail
From: Lars Ingebrigtsen <larsi@gnus.org>
Newsgroups: gmane.emacs.devel
Subject: Re: RFC: String interpolation
Date: Mon, 12 Dec 2016 15:47:03 +0100
Message-ID: <m37f755hnc.fsf@gnus.org>
References: <51825111-ace4-f750-4077-026a3b648d27@gmail.com>
	<8737hwnc52.fsf@lifelogs.com> <m34m2bj2m2.fsf@gnus.org>
	<8c117f5c-209a-97d8-79ce-a78f707f0545@gmail.com>
	<m3wpf7hjzf.fsf@gnus.org>
	<76c9c475-0180-aa49-3d4a-006d4e3f943c@gmail.com>
	<m3oa0ifgvd.fsf@gnus.org> <m2k2b6rxaj.fsf@gmail.com>
	<m38trmdun6.fsf@gnus.org>
	<jwvr35dub31.fsf-monnier+gmane.emacs.devel@gnu.org>
	<m3r35dcwht.fsf@gnus.org> <jwva8c1ti95.fsf-monnier+emacs@gnu.org>
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: blaine.gmane.org 1481557809 15616 195.159.176.226 (12 Dec 2016 15:50:09 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Mon, 12 Dec 2016 15:50:09 +0000 (UTC)
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)
Cc: emacs-devel@gnu.org
To: Stefan Monnier <monnier@iro.umontreal.ca>
Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 12 16:50:02 2016
Return-path: <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>
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 <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>)
	id 1cGSrY-0003Cj-B7
	for ged-emacs-devel@m.gmane.org; Mon, 12 Dec 2016 16:50:00 +0100
Original-Received: from localhost ([::1]:56439 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>)
	id 1cGSrc-0006Iw-Jh
	for ged-emacs-devel@m.gmane.org; Mon, 12 Dec 2016 10:50:04 -0500
Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49069)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <larsi@gnus.org>) id 1cGRsn-0005hx-RF
	for emacs-devel@gnu.org; Mon, 12 Dec 2016 09:47:15 -0500
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <larsi@gnus.org>) id 1cGRsj-0004Fs-0N
	for emacs-devel@gnu.org; Mon, 12 Dec 2016 09:47:13 -0500
Original-Received: from hermes.netfonds.no ([80.91.224.195]:51347)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <larsi@gnus.org>) id 1cGRsi-0004Fm-Pd
	for emacs-devel@gnu.org; Mon, 12 Dec 2016 09:47:08 -0500
Original-Received: from cm-84.215.1.64.getinternet.no ([84.215.1.64] helo=stories)
	by hermes.netfonds.no with esmtpsa
	(TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2)
	(envelope-from <larsi@gnus.org>)
	id 1cGRsd-0006Hn-BJ; Mon, 12 Dec 2016 15:47:05 +0100
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAD1BMVEXw38Deyqp5ZFT9+N/4
	6sxd//jbAAACRUlEQVQ4jVWUi5GrMAxF5eACLIcCsLIFwMgFiLX6r+ldGZLNYyYE69j6XAmIuRSm
	xEwFN6yI4g+m4jCURHlaimc8JKyNLNZ4SjjZ+LpygOtkTuGq3MATwUEVadjCAAIGXwnAjWursnaE
	qiy16FA9A7ilJiLacRBoUb1BN4J90x0OG1PY9dAbtKPpKXGtfYKeSPGrjVY1CY+Lwz56J1JLZWgf
	inKwIV+uEKNbYlU48GWvnBIeVHcz8pN57nIcqhRWnDCiUCrs3eAQSmq4PWgWmEYAQgWJ24jFkTkk
	QVEdyT1RY9um2xN6QsS66CgGL3aD7sQRQ3DaU2NHQW15A2Rbx8zKfhIAxwJu0Ae+hBuoqNY2F3t5
	B4+WeLSm8XMGJ4qePUNy2ShipAAOMOcjtmA+kmwpj/AKI0jZ1ENAqtKif933AG51HcgJWxBo0Ohu
	0A+q7XWdVVEE4gwR5tgMPblfdWApbfHxBqGeZacCL5zyEo0IcIbqXR0X6vPT1oQkmPb6o7Nrca8N
	41UeUS6d8ooEL1HPpvaIyRShLjhhAGhg4fSMpC9QBfLNOeNWt728gbG8ukUCSWpdjg/YK4J4TFDb
	HrIcbh9XLU+w12zRWLpBZsnuFMDt9QVOaE055ozzEZnTX/CGlyTamX/H/0DIc7TTf2MO3lmhRVKg
	I94GpABJPwCSMYBz9nhrvoBIwZwgtj3RJHp8AcyJWsm24E2YfZzgDIA3DROTRy93UgA2AXTE9A2M
	xxucE8wvzXX/O1Hl/hi14vhs3OAfin+WQpZ1ggEAAAAASUVORK5CYII=
In-Reply-To: <jwva8c1ti95.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message
	of "Mon, 12 Dec 2016 08:03:41 -0500")
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 80.91.224.195
X-BeenThere: emacs-devel@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: "Emacs development discussions." <emacs-devel.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-devel>,
	<mailto:emacs-devel-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/emacs-devel/>
List-Post: <mailto:emacs-devel@gnu.org>
List-Help: <mailto:emacs-devel-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-devel>,
	<mailto:emacs-devel-request@gnu.org?subject=subscribe>
Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org
Original-Sender: "Emacs-devel" <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>
Xref: news.gmane.org gmane.emacs.devel:210342
Archived-At: <http://permalink.gmane.org/gmane.emacs.devel/210342>

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> I see no need for renaming and altering the format statement itself:
>
>     (let ((thing (replace-regexp-in-string " +" " " thing)))
>       (fmt "This is %{thing}.2f"))

Ah, but then a typical programmer would just say

    (setq thing (replace-regexp-in-string " +" " " thing))
    (fmt "This is %{thing}.2f")

because programmers like setq more than introducing new, nesting
bindings.  And then they later want the original value of the variable
later, anyway, and then they finally rewrite it to use a let for or a
new variable name.

I've been doing PHP for decades.  Typical work flow.  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no