emacs-devel
[Top][All Lists]
Advanced

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

Re: RFC: String interpolation


From: Joost Kremers
Subject: Re: RFC: String interpolation
Date: Thu, 08 Dec 2016 09:38:37 +0100
User-agent: mu4e 0.9.18; emacs 25.1.50.3


On Thu, Dec 08 2016, Andreas Schwab wrote:
On Dez 08 2016, Clément Pit--Claudel <address@hidden> wrote:

Many languages are gaining literal string interpolations features of late (the latest example is Python; see https://www.python.org/dev/peps/pep-0498/). The TL;DR is that in Python 3.6 one can write this:

    value = 1.3
    print(f'The value is {value + 1:.2f}.')

This prints "The value is 2.30." Plenty of other languages have similar features.

It would be nice if Emacs offered something similar out of the box.

(format "The value is %.2f." (1+ value))

Well, yes, but if you have a longish string and more than two-three values to fill, it can be difficult to see what value goes where and what the resulting string will look like.

It may not be a must-have, but it's certainly a nice-to-have, IMvHO.



--
Joost Kremers
Life has its moments



reply via email to

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