In the absensce of a dedicated string-quoting-character (which would
actually _never_ appear inside a string, since it has a distinct
display-brother, which is to be used if you want to use the
string-quoting-character inside a text), should we go the same way as
C++ or PL/SQL, and support an arbitrary string quoting char sequence ?
e.g. (C++):
R"xxx(...)xxx"
where xxx is a (nearly) arbitrary char sequence.
(I am not advocating the C++ syntax, but I think any syntax chosen
should be combinable with the already existing large number of ways to
give different kinds of String/GString literals in Groovy)
Rationale: This would allow to fall back to a case/domain specific
string quoting char sequence which "never occurs inside the quoted string".
On a side note, what I could also have used in the past would have been
some way to give a trimmed string literal (i.e. one that strips away
newline and whitespaces automatically). Not sure whether that would make
sense to put this inside the string quoting syntax, though.
Cheers,
mg
On 24.02.2018 17:43, Daniel.Sun wrote:
Double backticks look a bit ugly IMO... I prefer the same way to escape, i.e.
use \ to escape.
Cheers,
Daniel.Sun
--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html