[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "Raw" string literals for elisp
From: |
Philip Kaludercic |
Subject: |
Re: "Raw" string literals for elisp |
Date: |
Wed, 08 Sep 2021 21:24:20 +0000 |
Stefan Kangas <stefan@marxist.se> writes:
> Philip Kaludercic <philipk@posteo.net> writes:
>
>> The reason I use rx in a lot of my scripts is that I can add comments,
>> explanations, formatting, etc. when it gets complicated. I think that is
>> a significant advantage, that even raw strings wouldn't have (unless a
>> comment syntax were to be added into the regular expression language,
>> which is unlikely).
>
> Perl has this:
>
> perl -e '$foo = "bar"; print "yes" if $foo =~ / bar # comment /x;'
>
> is equivalent to
>
> perl -e '$foo = "bar"; print "yes" if $foo =~ /bar/;'
Yes, but taking backwards compatibility into account, you cannot just
define some character to be used for comments.
--
Philip Kaludercic
- Re: "Raw" string literals for elisp, (continued)
- Re: "Raw" string literals for elisp, Philip Kaludercic, 2021/09/08
- Re: "Raw" string literals for elisp, Alan Mackenzie, 2021/09/08
- Re: "Raw" string literals for elisp, Stefan Kangas, 2021/09/08
- Re: "Raw" string literals for elisp,
Philip Kaludercic <=
- Re: "Raw" string literals for elisp, tomas, 2021/09/09
- Re: "Raw" string literals for elisp, Stefan Kangas, 2021/09/08
- Re: "Raw" string literals for elisp, tomas, 2021/09/08
- Re: "Raw" string literals for elisp, Lars Ingebrigtsen, 2021/09/08
- Re: "Raw" string literals for elisp, Stefan Monnier, 2021/09/08
- Re: "Raw" string literals for elisp, Stefan Monnier, 2021/09/08
- Re: "Raw" string literals for elisp, tomas, 2021/09/09
- Re: "Raw" string literals for elisp, Mattias Engdegård, 2021/09/09
- Re: "Raw" string literals for elisp, Stefan Kangas, 2021/09/09
- Re: "Raw" string literals for elisp, Mattias Engdegård, 2021/09/09