[Top][All Lists]

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

Re: character sets as they relate to “Raw” string literals for elisp

From: Stefan Monnier
Subject: Re: character sets as they relate to “Raw” string literals for elisp
Date: Mon, 04 Oct 2021 12:34:19 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> Suppose our hypothetical contributor wanted to contribute a new mode
> with this type of code in it:
>     (defun 日本 () (message "日本"))
> That is, all of the identifiers in the source code for this mode are
> named in some horrible foreign script that you cannot read. Is it so
> much more unreadable if it sometimes has to be displayed like this?
>     (defun \u65E5\u672C () (message "\u65E5\u672C"))

FWIW, I consider this case quite different from your raw-string case,
because here the main issue for me is whether the code is maintainable
and reviewable by someone else.  So, in the context of Emacs, GNU
ELPA, and NonGNU ELPA, I find such uses problematic.  If I could count
on having someone else I trust do the reviewing, I might reconsider.

>     (defvar variable-containing-html #r「<a href="foo.html">click here</a>」)

I have no serious objection against uses of non-ASCII in a language's
syntax, as in the example above.  That's orthogonal to my opinion that
raw strings are better left out of ELisp.


reply via email to

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