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: Eli Zaretskii
Subject: Re: [PATCH] Interpret #r"..." as a raw string
Date: Fri, 05 Mar 2021 10:01:28 +0200

> From: Richard Stallman <rms@gnu.org>
> Cc: eliz@gnu.org, db48x@db48x.net, conao3@gmail.com,
>       monnier@iro.umontreal.ca, emacs-devel@gnu.org
> Date: Fri, 05 Mar 2021 00:39:27 -0500
> 
> In Lisp, a program is a data structure.  It does not contain string
> literals -- it contains strings.  Thus, various sections of the manual
> can talk about what happens if you use a string in a certain
> expression, but they don't need to talk about the printed representation
> of that expression.

I understand what you are saying, but still there is a difference
between

   (concat foo bar)

and

   (concat foo "what we call a literal string")

Even if 'bar's value is the same string as the one that appears
literally in the second example, there's at least a visual difference.
And in fact, the difference is not only visual, because the
byte-compiler is allowed to treat such "literal" strings specially in
some situations.  This is one reason why the ELisp manual mentions
literal strings: it needs to describe those special situations and the
pitfalls they bring with them.

Another reason is that many (most?) readers understand "literal
string" in the sense of the above example, so it is a convenient way
of making sure the reader understands what is being discussed.

Why is it harmful to use this terminology in conjunction with Lisp,
even though its semantics in Lisp is somewhat different?



reply via email to

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