+200.  Or even

    String s = β€œ`" + `a raw string` + β€œ`”;

It’s perfectly okay to use both kinds of string in one expression.
        
> On Feb 23, 2018, at 4:00 PM, Brian Goetz <brian.go...@oracle.com> wrote:
> 
> 
> 
>> 
>> However, since the JEP's goal is to allow copy-paste of arbitrary text 
>> without interpretation, I think the RawSP trick of assigning meaning to 
>> whitespace is out of place. To most people, the raw string literal:
>> 
>>   ` and `
>> 
>> denotes a perfectly good five-character string that will probably be 
>> inserted between two other strings. Explaining that, no, it's really a 
>> three-character string will not be popular.
> 
> +100.  The RawSP trick is clever, but too much so.  There are ample simpler 
> approaches for beginning/ending with BT:
> 
>     String s = BACKTICK + `a raw string` + BACKTICK;
>     String s = `` `a raw string` ``.trim();
> 
> These move the cognitive load on the user to the corner case, rather than 
> landing it on the general case.
> 
> 

Reply via email to