From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Raw string literals in Emacs lisp. Date: Sat, 2 Aug 2014 10:23:15 +0000 Message-ID: <20140802102315.GB3541@acm.acm> References: <8761ijng08.fsf@uwakimon.sk.tsukuba.ac.jp> <871tt7lzro.fsf@fencepost.gnu.org> <53D567FD.4030708@porkrind.org> <87r412iobp.fsf@lifelogs.com> <53D9586F.6020705@porkrind.org> <87bns6in3g.fsf@lifelogs.com> <20140802084744.GA3541@acm.acm> <87vbqbqmn3.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1406975325 3371 80.91.229.3 (2 Aug 2014 10:28:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 2 Aug 2014 10:28:45 +0000 (UTC) Cc: emacs-devel@gnu.org To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 02 12:28:38 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XDWYI-0008UP-1S for ged-emacs-devel@m.gmane.org; Sat, 02 Aug 2014 12:28:38 +0200 Original-Received: from localhost ([::1]:43651 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDWYH-0004Un-IN for ged-emacs-devel@m.gmane.org; Sat, 02 Aug 2014 06:28:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57817) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDWY9-0004Ui-RZ for emacs-devel@gnu.org; Sat, 02 Aug 2014 06:28:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XDWXv-0008MG-Bh for emacs-devel@gnu.org; Sat, 02 Aug 2014 06:28:29 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:27634 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDWXv-0008Lt-0e for emacs-devel@gnu.org; Sat, 02 Aug 2014 06:28:15 -0400 Original-Received: (qmail 34054 invoked by uid 3782); 2 Aug 2014 10:28:13 -0000 Original-Received: from acm.muc.de (pD9518E63.dip0.t-ipconnect.de [217.81.142.99]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 02 Aug 2014 12:28:12 +0200 Original-Received: (qmail 5196 invoked by uid 1000); 2 Aug 2014 10:23:15 -0000 Content-Disposition: inline In-Reply-To: <87vbqbqmn3.fsf@fencepost.gnu.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 8.x X-Received-From: 193.149.48.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:173377 Archived-At: 'afternoon, David. On Sat, Aug 02, 2014 at 11:14:08AM +0200, David Kastrup wrote: > Alan Mackenzie 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).