emacs-devel
[Top][All Lists]
Advanced

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

Re: RFC: String interpolation


From: John Wiegley
Subject: Re: RFC: String interpolation
Date: Tue, 13 Dec 2016 16:10:36 -0800
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1.90 (darwin)

>>>>> "PE" == Paul Eggert <address@hidden> writes:

PE> Apparently some people prefer this style -- it's what started the thread,
PE> after all.

What if we did something a little more implicit:

For a format string, the number of occurrences % in that string determines how
many arguments it "consumes". Once that many arguments have been consumed, the
process restarts.

This way you could just say:

    (format "This %d" 10 " and this %d" 20)

Or:

    (format "This %d and %d" 10 20 " and this %d" 30)

Or:

    (format "This %d and %d and %d" 10 20 30)

Then there is no reason to assign a special meaning to "%" at the end of a
format string.

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2



reply via email to

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