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: Stefan Monnier
Subject: Re: [PATCH] Interpret #r"..." as a raw string
Date: Tue, 02 Mar 2021 10:11:18 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> I'm willing to believe it, but so far the only concrete examples I've
>> seen where raw string literals could be helpful are regexps.
>
> It's the most common use-case. The other is embedding conf files or
> source files in other languages (which is the same really, except
> there's no rx equivalent for those). It's pretty nice to be able to
> just dump some text verbatim (especially when copy pasting it from
> somewhere) with some special quotes at the start and at the end and
> not have to worry about it.

I'm sorry, but I can't quite see what you're talking about.  Can you
point to existing code where there is such embedded "conf files or
source files" so we can better judge the potential benefit?
[ And in my experience "not have to worry about it" is an illusion:
  you can never truly escape the need for escaping.  ]

> I understand. I see some benefits with no cons.

If you don't see the cons, then indeed the tradeoff is clear ;-)


        Stefan




reply via email to

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