[Top][All Lists]

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

Re: Raw string literals in Emacs lisp.

From: Alan Mackenzie
Subject: Re: Raw string literals in Emacs lisp.
Date: Sat, 2 Aug 2014 10:23:15 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

'afternoon, David.

On Sat, Aug 02, 2014 at 11:14:08AM +0200, David Kastrup wrote:
> Alan Mackenzie <address@hidden> writes:

> > Hello, Ted.

> > On Wed, Jul 30, 2014 at 04:54:43PM -0400, Ted Zlatanov wrote:

> >> ....., I just want a simple syntax for literal data :)

> >> How about using a Unicode character as the marker? (prepares for stoning)

> > OK, it's taken time, and nobody else looks like they're about to do it,
> > so I will cast the first stone.

> > NO, NO, NO, NO!  The only Unicode characters to be used in Emacs are
> > those that are also ASCII characters, with a tiny number of essential
> > exceptions (for example, the non-European characters in the sentence-end
> > regexp, and, of course, people's names in comments).

> > A Non-ASCII character is difficult to type for most people.  Not all
> > setups can display it.  Adopting such a character would mean a lot of
> > work for a lot of people.

> > And using such characters as delimiters would introduce yet one more
> > incompatibility with XEmacs which, Stephen informs us, uses #r"..." for
> > raw strings.  Why not just adapt that convention?  Easy to type, easy to
> > read, easy to parse.

> Easy to parse?

> r#"?\" is a complete string.  How do you parse it backwards?

Parsing practically _anything_ backwards (especially comments) is
difficult.  There's nothing particularly difficult about #r"?\" that
isn't shared by, e.g. /*  /*  */.  Heuristics will be needed for strings,
should raw strings come to exist, just as they are for comments.

> -- 
> David Kastrup

Alan Mackenzie (Nuremberg, Germany).

reply via email to

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