From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Raw strings (experimental patches inside) Date: Fri, 10 Aug 2012 14:50:20 -0400 Message-ID: References: <651F6603-F798-4381-929E-7D86A28DBC4D@gmail.com> <502464D6.4000103@gmail.com> <87wr1749m0.fsf@uwakimon.sk.tsukuba.ac.jp> <87r4rehd19.fsf@uwakimon.sk.tsukuba.ac.jp> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1344624636 19387 80.91.229.3 (10 Aug 2012 18:50:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 10 Aug 2012 18:50:36 +0000 (UTC) Cc: Vr Rm , Emacs development discussions To: "Stephen J. Turnbull" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 10 20:50:36 2012 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 1SzuI2-0004xU-Gq for ged-emacs-devel@m.gmane.org; Fri, 10 Aug 2012 20:50:30 +0200 Original-Received: from localhost ([::1]:37666 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzuI1-0002ds-Oi for ged-emacs-devel@m.gmane.org; Fri, 10 Aug 2012 14:50:29 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52505) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzuHz-0002cK-0C for emacs-devel@gnu.org; Fri, 10 Aug 2012 14:50:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzuHv-0000CT-Sg for emacs-devel@gnu.org; Fri, 10 Aug 2012 14:50:26 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:58035) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzuHv-0000C6-Os for emacs-devel@gnu.org; Fri, 10 Aug 2012 14:50:23 -0400 Original-Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q7AIoKIE013007; Fri, 10 Aug 2012 14:50:20 -0400 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 1B001B4177; Fri, 10 Aug 2012 14:50:20 -0400 (EDT) In-Reply-To: <87r4rehd19.fsf@uwakimon.sk.tsukuba.ac.jp> (Stephen J. Turnbull's message of "Sat, 11 Aug 2012 02:28:34 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4306=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4306> : streams <797272> : uri <1189093> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 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:152418 Archived-At: >> 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