emacs-devel
[Top][All Lists]
Advanced

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

Re: RFC: String interpolation


From: Lars Ingebrigtsen
Subject: Re: RFC: String interpolation
Date: Wed, 14 Dec 2016 15:10:03 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Paul Eggert <address@hidden> writes:

>> I don't think you'd want to rewrite that to
>>
>> (message "The time is %d%" clock " in the %s%" part " bit of %s%" country)
>>
>> Or would you?  (The final "%" is optional, of course.")
>
> Apparently some people prefer this style -- it's what started the
> thread, after all.

Well, no -- that's not the style that started the thread.  :-)

What some people would like is something that looks like

(message "The time is $clock in the $part bit of $country")

which is very different visually and comprehension wise: You see pretty
much immediately what the result is going to look like by looking at the
source code, while that's not true for the interpolated version at the
time, which has a lot more visual noise.

But, as I've said, I have reservations (and no enthusiasm) about simple
string interpolation, and I have some doubts that the style at the top
will satisfy the craving for simple string interpolation.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

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