Draft JEP: Raw String Literals

Stephen Colebourne scolebourne at joda.org
Sun Jan 28 23:47:31 UTC 2018


I welcome this change.

The motivating use cases and explanation is good, although perhaps the
rationale for rejecting triple double-quote could have been stated
slightly more clearly (as I think that would be the default choice
most people would have gone with).


Its worth noting that I had thought backtick might end up being used
for extensible literals, such as for date and time or currencies:

 LocalDate date = `2018-01-02`;
 Currency cur = `GBP`;

However, with local variable type inference, this approach doesn't
really work anyway, making this syntax moot.


As such, I'm OK with using backtick. I don't love it, but on balance
it seems like a reasonable choice.

Stephen


On 27 January 2018 at 14:43, Jim Laskey <james.laskey at oracle.com> wrote:
> The time has come to revisit strings in terms of the modern development world. “Java remains one of a small group of contemporary programming languages that do not provide language-level support for raw strings.”
>
> This JEP proposes the introduction of Raw String Literals into the Java Language.
>
> Cheers,
>
> — Jim
>
> https://bugs.openjdk.java.net/browse/JDK-8196004 <https://bugs.openjdk.java.net/browse/JDK-8196004>
>


More information about the amber-dev mailing list