Re: Java raw string literals

2018-02-25 Thread Paolo Di Tommaso
I may agree that double back-tick is not nice, however the rationale of this choice is that this syntax is meant to enable *raw* string literals i.e. a string for which is not required to escape the content of *any* character. In this context it makes sense. They are created exactly how they are ty

Re: Java raw string literals

2018-02-24 Thread MG
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 a

Re: Java raw string literals

2018-02-24 Thread Daniel.Sun
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

Re: Java raw string literals

2018-02-24 Thread Paolo Di Tommaso
The proposal mention double back-ticks for a string containing a back-tick, eg ``can`t`` // a string containing 'c', 'a', 'n', '`' and 't' See http://openjdk.java.net/jeps/8196004 Also they are collecting users feedback, have a look at this link . p

Re: Java raw string literals

2018-02-24 Thread Daniel Sun
> 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`. OK. We should avoid escaping too in Groovy. I wonder whether raw s

Re: Java raw string literals

2018-02-24 Thread Paolo Di Tommaso
trings syntaxes. Cheers, Paolo On Fri, Feb 23, 2018 at 10:33 PM, Jochen Theodorou 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 s

Re: Java raw string literals

2018-02-23 Thread Daniel Sun
It's not difficult to support Java's raw string in the Parrot parser. But it's a pity that Java use Backtick(`) character... which could have been used more expressively in Groovy... It recalls me that the exprimental feature "Custom Operator"[1] ... Cheers, Daniel.Sun [1] https://github.com/dan

Re: Java raw string literals

2018-02-23 Thread Jochen Theodorou
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

Java raw string literals

2018-02-23 Thread Paolo Di Tommaso
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? Cheers, Paolo