emacs-devel
[Top][All Lists]
Advanced

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

Re: "Raw" string literals for elisp


From: tomas
Subject: Re: "Raw" string literals for elisp
Date: Thu, 9 Sep 2021 08:52:41 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Sep 08, 2021 at 11:11:00PM +0200, Stefan Kangas wrote:
> 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;'

Yes, Perl's "extended" regexps. They are very handy for when the concise
language is too cunfusing.

I'd tend to the position that this "ecological niche" is already (very
well) covered by `rx'. But I am aware that this is a very subjective
topic :)

Cheers
 - t

Attachment: signature.asc
Description: Digital signature


reply via email to

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