Re: Raw string literals and Unicode escapes

2018-02-26 Thread Maurizio Cimadamore
I stand corrected - repeated underscores are allowed - but Josh's example reminded me of the state of affair with raw strings. Maurizio On 26/02/18 22:57, Maurizio Cimadamore wrote: At least there were other cases were we found different trade off between expressiveness and practicality - s

Re: Raw string literals and Unicode escapes

2018-02-26 Thread Maurizio Cimadamore
Of course - delimiters is not part of the string length - I see now why you can have (in theory) unbound prefix/suffix. Personally, I find the argument - "because you can have unlimited-length identifiers" not a great fit. From a lexer writer perspective, I can see that it is used as a candida

Re: Raw string literals and Unicode escapes

2018-02-26 Thread John Rose
On Feb 26, 2018, at 1:29 PM, Maurizio Cimadamore wrote: > > On 26/02/18 20:17, John Rose wrote: >> Any *finite choice* of end-quotes has the same problem, with >> a non-zero probability that decreases (but does not vanish) >> with the number of available end-quotes. The only way to >> break out

Re: Raw string literals and Unicode escapes

2018-02-26 Thread Jim Laskey
Why introduce an artificial limit? Identifiers don’t have a limit. 3.8. Identifiers An identifier is an unlimited-length sequence of Java letters and Java digits, the first of which must be a Java letter. — Jim > On Feb 26, 2018, at 5:29 PM, Maurizio Cimadamore > wrote: > > > > On 26/02/18

Re: Raw string literals and Unicode escapes

2018-02-26 Thread Maurizio Cimadamore
On 26/02/18 20:17, John Rose wrote: Any*finite choice* of end-quotes has the same problem, with a non-zero probability that decreases (but does not vanish) with the number of available end-quotes. The only way to break out of the box is to allow the user an unlimited range of successively "st

Re: Raw string literals and Unicode escapes

2018-02-26 Thread John Rose
On Feb 26, 2018, at 10:43 AM, Alex Buckley wrote: > > On 2/25/2018 4:19 AM, Remi Forax wrote: >> I'm late in the game but why not using the same system as Perl, PHP, >> Ruby to solve the Lts [1], i.e >> you have a sequence that says this is the starts of a raw string (%Q, >> qq, m) then a charact

Re: Raw string literals and Unicode escapes

2018-02-26 Thread Alex Buckley
On 2/25/2018 4:19 AM, Remi Forax wrote: I'm late in the game but why not using the same system as Perl, PHP, Ruby to solve the Lts [1], i.e you have a sequence that says this is the starts of a raw string (%Q, qq, m) then a character (in a predefined list), the raw string and at the end of the ra