From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!.POSTED!not-for-mail
From: Stefan Monnier <monnier@iro.umontreal.ca>
Newsgroups: gmane.emacs.devel
Subject: Re: RFC: String interpolation
Date: Thu, 08 Dec 2016 15:04:08 -0500
Message-ID: <jwvlgvqfat3.fsf-monnier+gmane.emacs.devel@gnu.org>
References: <51825111-ace4-f750-4077-026a3b648d27@gmail.com>
	<87r35iwkg7.fsf@fastmail.fm>
	<0e6143f6-456b-5086-db27-439df4a5be27@gmail.com>
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: blaine.gmane.org 1481227474 4262 195.159.176.226 (8 Dec 2016 20:04:34 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 8 Dec 2016 20:04:34 +0000 (UTC)
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux)
To: emacs-devel@gnu.org
Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 08 21:04:30 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 1cF4ve-0000Fh-1B
	for ged-emacs-devel@m.gmane.org; Thu, 08 Dec 2016 21:04:30 +0100
Original-Received: from localhost ([::1]:48675 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 1cF4vi-0004ib-4p
	for ged-emacs-devel@m.gmane.org; Thu, 08 Dec 2016 15:04:34 -0500
Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45223)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ged-emacs-devel@m.gmane.org>) id 1cF4vX-0004eK-9J
	for emacs-devel@gnu.org; Thu, 08 Dec 2016 15:04:24 -0500
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ged-emacs-devel@m.gmane.org>) id 1cF4vT-0002i7-BK
	for emacs-devel@gnu.org; Thu, 08 Dec 2016 15:04:23 -0500
Original-Received: from [195.159.176.226] (port=59615 helo=blaine.gmane.org)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <ged-emacs-devel@m.gmane.org>)
	id 1cF4vT-0002hM-3z
	for emacs-devel@gnu.org; Thu, 08 Dec 2016 15:04:19 -0500
Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2)
	(envelope-from <ged-emacs-devel@m.gmane.org>) id 1cF4vK-0005q6-85
	for emacs-devel@gnu.org; Thu, 08 Dec 2016 21:04:10 +0100
X-Injected-Via-Gmane: http://gmane.org/
Original-Lines: 12
Original-X-Complaints-To: usenet@blaine.gmane.org
Cancel-Lock: sha1:J4Ojv0btwmmMJRRWwM56ecVRQSc=
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 195.159.176.226
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:210151
Archived-At: <http://permalink.gmane.org/gmane.emacs.devel/210151>

>>> fmt expands the strings at compile time (so they must be constant
>>> strings).
>> I've occasionally appreciated the fact that I can pass a dynamically
>> created format string to `format'... ;-) Ok, I could always use
>> `format' in such cases.
> Yes; otherwise, fmt becomes a thinly veiled eval, and that isn't great.

Not only that, but if it's a function it doesn't have access to the
variables in the lexical scope of the caller.


        Stefan