[Top][All Lists]

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

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

From: Stefan Monnier
Subject: Re: [PATCH] Interpret #r"..." as a raw string
Date: Tue, 02 Mar 2021 19:27:42 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> There are 101 lines using ⟦\\\\\\\\⟧.
>      rg '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'

In the best case with raw string literals this would be brought down to:

      rg '\\\\\\\\\\\\\\\\'

>     textmodes/reftex-vars.el
>     564:      \"\\\\\\\\begin{eqnarray}\\\\|\\\\\\\\\\\\\\\\\" works for 
> eqnarrays.

And this would be:

     564:      "\\\\begin{eqnarray}\\|\\\\\\\\" works for eqnarrays.

While it's clearly a bit better, it's clearly no silver bullet.

> Look at that! 19 backslashes followed by a double–quote. That’s just
> stupid.

The new version has fewer backslashes, but I'm not sure it'd be few
enough to get below the threshold for "stupid".

> I think the benefits would add up pretty quickly.

I'm not convinced.


reply via email to

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