emacs-devel
[Top][All Lists]
Advanced

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

Re: Raw strings (experimental patches inside)


From: Stefan Monnier
Subject: Re: Raw strings (experimental patches inside)
Date: Fri, 10 Aug 2012 14:50:20 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

>> And here we're back at regexps.  I already agreed that they're
>> convenient for regexps, but pointed out that a better solution would be
>> to fix the regexp syntax so it doesn't backslash-escape every
>> special character.
> Yeah, I know -- I pointed that out too.  That's still not a substitute
> for raw strings in code.

Why not?

> You still need to *double*-backslash-escape, backslash-escaping is
> insufficient.

If the special chars don't need to be backslash escaped, then you don't
need to double escape either, obviously.

> It's only "better" if you have rawstring phobia.

I don't have rawstring phobia.  I just think it's a workaround which
makes Elisp's syntax more complex without fixing the real problem.

>> That would help not just Elisp coders but Emacs users as well and
>> would make Elisp regexps even more readable than raw strings can
>> ever hope to make them.
> True, but both is better.

I still haven't heard of a good argument why you'd still need
raw-strings if the regexp syntax was made not to need backslashes for
most special chars.
Could it make the syntax slightly better?  Yes.  Would the difference
be significant?  I doubt it.


        Stefan



reply via email to

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