Path: csiph.com!usenet.pasdenom.info!news.albasani.net!news.musoftware.de!wum.musoftware.de!feeds.phibee-telecom.net!usenet.ukfsn.org!not-for-mail From: Martin Gregorie Newsgroups: comp.lang.java.programmer Subject: Re: multi-line Strings Date: Tue, 11 Dec 2012 00:17:28 +0000 (UTC) Organization: UK Free Software Network Lines: 20 Message-ID: References: <7f36342c-2331-4484-874b-4a0f8953f160@googlegroups.com> <50c61150$0$293$14726298@news.sunsite.dk> <50c6413a$0$293$14726298@news.sunsite.dk> <50c6598d$0$290$14726298@news.sunsite.dk> NNTP-Posting-Host: 84.45.235.129 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: localhost.localdomain 1355185048 17449 84.45.235.129 (11 Dec 2012 00:17:28 GMT) X-Complaints-To: usenet@localhost.localdomain NNTP-Posting-Date: Tue, 11 Dec 2012 00:17:28 +0000 (UTC) User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Xref: csiph.com comp.lang.java.programmer:20234 On Mon, 10 Dec 2012 18:04:33 -0500, Eric Sosman wrote: > It's unfortunate that both Java and regex use \ so heavily, > because it leads to a lot of escaping-of-escapes and harms readability. > But why should it be a given that Java's literals should be different to > avoid conflict with regex syntax? Why not change the regex syntax > instead, and use, say, ~ for the role now taken by \? It might improve > regexes to the point where they're merely unreadable, instead of > intolerable. ;-) I've always liked the Awk and Perl default convention of delimiting regexes with slashes: /regex/ - if their compilers can deal with this cleanly, the Java compiler could surely do the same. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |