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 02:42:23 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Michael Albinus <michael.albinus@gmx.de> writes:

> Daniel Brooks <db48x@db48x.net> writes:
>
> Hi Daniel,
>
>>     net/tramp-sh.el
>>     962:    quoted=`echo \"$file\" | sed -e \"s/\\\"/\\\\\\\\\\\\\\\\\\\"/\"`
>>
>> Look at that! 19 backslashes followed by a double–quote. That’s just
>> stupid. I wonder if it’s a record? Should we use git blame to find the
>> names of every person who touched that line and ask them what they
>> think? I can guess what they would say.
>
> Really? I'm the only person who has updated this line, and I'm quite
> happy with the state of affairs.

Then I guessed wrong. Will you be insulted if I assume that you have a
slight case of stockholm syndrome? ;D

> And in any case, Tramp won't use raw string literals for the next 10
> years or so, because it must be backward compatible.

That's fine. I'm not suggesting that anyone should rewrite the thirty or
fourty thousand lines of lisp in Emacs that have excess backslashes
either. They already work! They're fine.

I think a raw string syntax is a good idea because of the time it will
save us all in the future, writing the next thirty or fourty thousand
lines. And then, after that, people will write another thirty or fourty
thousand lines. A generation after that will write yet more code that
has syntax nested inside of syntax, and the time saved will continue to
add up. As the millenia pass by, more and more time will be saved, to be
spent on more useful things. Humans all across the Milky Way and even as
far as its satellite dwarf galaxies, will all happily use raw string
syntax never knowing that one of their distant ancestors blithely wrote,
tested, and debugged a line with 19 backslashes in a row merely because
raw strings hadn't been properly invented yet. As the first ships depart
for Andromeda carrying the seeds of new civilizations, computers filled
to the brim with software…

You get the idea. The cost is small, and the benefit is large.

db48x



reply via email to

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