groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paolo Di Tommaso <paolo.ditomm...@gmail.com>
Subject Re: Java raw string literals
Date Sat, 24 Feb 2018 08:45:21 GMT
Hi,

It's true that's still a draft proposal, but considering the new fast Java
release train I think it's worth to start to think about.

Then, yes, Groovy has a plenty of string syntaxes single and double triple
quote, slashy strings, slashy dollar strings, etc.

However the main difference of the new Java proposal is that the Raw string
literals do not perform any escape of special characters e.g.
`hello\nworld` would *not* contain a new-line character but exactly
back-slash followed by a `n`.

This is handy in some use cases and therefore fill a gap in the groovy
(rich) strings syntaxes.



Cheers,
Paolo




On Fri, Feb 23, 2018 at 10:33 PM, Jochen Theodorou <blackdrag@gmx.org>
wrote:

> On 23.02.2018 21:31, Paolo Di Tommaso wrote:
>
>> Hi people,
>>
>> I was wondering if there any plan to include in the new parrot parser the
>> support the new Java raw string literals.
>>
>> http://openjdk.java.net/jeps/8196004
>>
>>
>> Thoughts?
>>
>
> we have """ and we have ''', so there is no functional gap to close by
> this and it is not new for us either. I would therefore maybe wait a bit
> and see how this JEP develops. Do you have any information about the state
> of this?
>
> byye Jochen
>

Mime
View raw message