emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFC: String interpolation


From: Helmut Eller
Subject: Re: RFC: String interpolation
Date: Mon, 12 Dec 2016 17:39:05 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]