From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.devel Subject: Re: RFC: String interpolation Date: Mon, 12 Dec 2016 17:39:05 +0100 Message-ID: References: <51825111-ace4-f750-4077-026a3b648d27@gmail.com> <8737hwnc52.fsf@lifelogs.com> <8c117f5c-209a-97d8-79ce-a78f707f0545@gmail.com> <76c9c475-0180-aa49-3d4a-006d4e3f943c@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1481561249 10751 195.159.176.226 (12 Dec 2016 16:47:29 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 12 Dec 2016 16:47:29 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 12 17:47:25 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 1cGTl4-00025Y-WD for ged-emacs-devel@m.gmane.org; Mon, 12 Dec 2016 17:47:23 +0100 Original-Received: from localhost ([::1]:58662 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGTl7-0007BE-KA for ged-emacs-devel@m.gmane.org; Mon, 12 Dec 2016 11:47:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48610) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGTdJ-0005z9-VY for emacs-devel@gnu.org; Mon, 12 Dec 2016 11:39:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cGTdA-0006JP-9H for emacs-devel@gnu.org; Mon, 12 Dec 2016 11:39:22 -0500 Original-Received: from [195.159.176.226] (port=39681 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cGTdA-0006IN-3m for emacs-devel@gnu.org; Mon, 12 Dec 2016 11:39:12 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1cGTd2-0003n7-8r for emacs-devel@gnu.org; Mon, 12 Dec 2016 17:39:04 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 16 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:LjHmEA/OPbN5VyQWg0oDByDtg/Q= 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." 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:210346 Archived-At: On Sun, Dec 11 2016, Stefan Monnier wrote: >>> Keyword paramaters are also an option: >>> (fmt "This is %{thing}.2f and %{zot}ss" :thing (funcall '+ 3.42423 4)) >> Yeah, that's prettier. > > FWIW, I don't see why that's preferable to > > (let ((thing (funcall '+ 3.45453 4))) > (preformat "This is %[2f]{thing} and %{zot}ss")) Rust also uses "named arguments" (aka keyword paramaters) for their fmt macro. Maybe the Rust designers could explain why. See: https://doc.rust-lang.org/std/fmt/ Helmut