emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Interpret #r"..." as a raw string


From: Daniel Brooks
Subject: Re: [PATCH] Interpret #r"..." as a raw string
Date: Wed, 03 Mar 2021 01:25:40 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Andreas Schwab <schwab@linux-m68k.org> writes:

> On Mär 02 2021, Daniel Brooks wrote:
>
>>     net/tramp-sh.el
>>     962:    quoted=`echo \"$file\" | sed -e \"s/\\\"/\\\\\\\\\\\\\\\\\\\"/\"`
>>
>> Look at that! 19 backslashes followed by a double–quote.
>
> That can easily be halved by using '' instead of "".

That is absolutely true. We could then halve it again by using a raw
string literal. (Or we could eliminate it entirely with a suitable
abstraction, but that's for a different conversation.)

As escaping is an exponential function, anything we can do to reduce
that exponent is equally valuable.

db48x



reply via email to

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