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