groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cédric Champeau <cedric.champ...@gmail.com>
Subject Re: About raw string and enhanced try-with-resource
Date Tue, 15 May 2018 11:17:25 GMT
+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 <jesper@selskabet.org>:

> On 15 May 2018, at 12.31, Paolo Di Tommaso <paolo.ditommaso@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
>
>

Mime
View raw message