Path: csiph.com!usenet.pasdenom.info!news.albasani.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: markspace <-@.> Newsgroups: comp.lang.java.programmer Subject: Re: multi-line Strings Date: Mon, 10 Dec 2012 09:42:30 -0800 Organization: A noiseless patient Spider Lines: 28 Message-ID: References: <7f36342c-2331-4484-874b-4a0f8953f160@googlegroups.com> <50c61150$0$293$14726298@news.sunsite.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Mon, 10 Dec 2012 17:42:33 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="61282af8d6595e8d991edb5ac03d6e00"; logging-data="5620"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ZJ3cFP2uR6FsVUjWhrtydHzBPZHBr+nA=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: <50c61150$0$293$14726298@news.sunsite.dk> Cancel-Lock: sha1:dAYtNI9a/yVa9tfWZ2fMT1wywls= Xref: csiph.com comp.lang.java.programmer:20216 On 12/10/2012 8:43 AM, Arne Vajhøj wrote: > It could be added.... > > But I would not consider it a high priority. > > It is most useful for demo code. > > For real code then large chunks of texts would usually > be stored externally (file, DB etc.) not embedded into > the code. I agree. I was going to suggest that bob use a resource, in fact, which is of course an external file. I think what I'd like more than multi-line support is support for strings without escape sequences. Like: String regex = """\s[0-9](\.|\*)[_a-zA-Z]\w"""; is a lot more readable than trying to mentally decode all of the double slashes that regex in Java frequently requires. (That regex does nothing useful, btw; it's just an example.)