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: Philip Kaludercic
Subject: Re: "Raw" string literals for elisp
Date: Wed, 08 Sep 2021 19:22:18 +0000

Alan Mackenzie <acm@muc.de> writes:

> It is more readable in the same way Cobol was very readable; each small
> grouping of text is immediately understandable.  But the thing as a
> whole?  The rx form of that regexp takes up 6 lines, the string form 1
> line.  If there are several regexps in a function rx can lead to a lot of
> bloat.  Having the function fit entirely on one's screen contributes a
> lot towards readability and maintainability.

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).

-- 
        Philip Kaludercic



reply via email to

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