+1 for both. In particular I like that you can choose your own delimiter in
Java 11 raw strings.

2018-05-15 12:48 GMT+02:00 Jesper Steen Møller <jes...@selskabet.org>:

> On 15 May 2018, at 12.31, Paolo Di Tommaso <paolo.ditomm...@gmail.com>
> wrote:
>
>
> No. There's an important difference: raw strings do not escape any special
> character ie. backlashes, dollars, back-ticks, etc.
>
>
> Ah, I didn't actually realize that Groovy's current '''multiline''' style
> interpreted \ escapes. Haven't used it much, I suppose.
>
> This is very useful for DSLs when it's required to embed a piece of
> foreign code (think for example Bash) into a string. With groovy
> multi-line string you still need to escape a lot stuff, making very
> difficult for the user to handle it.
>
>
> I totally agree, I was just wrong about the semantics of the '''multiline,
> non-interpolation string'''.
>
> -Jesper
>
>

Reply via email to