Re: multi-line Strings
On 12/10/12 9:42 AM, markspace wrote:
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.
<http://docs.oracle.com/javase/7/docs/technotes/guides/lang/resources.html#class>
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.)
IntelliJ IDEA actually has a way to open just the expression in its own
edit window. The expression in the edit window is in the expression
language (regex in this case), so no Java escaping is necessary. You
can then modify it, and IDEA will add the appropriate escaping back in.
They support this for many languages in many contexts. Its a pretty
nifty feature IMHO.