Wrapping up the first two courses

Brian Goetz brian.goetz at oracle.com
Fri Apr 26 16:52:32 UTC 2019

On 4/26/2019 11:56 AM, Kevin Bourrillion wrote:
>     Which raises another question: do we allow \<terminator> in SL
>     strings?  (I presume so, and we just eat the \ and the terminator.)
> Hmm, I can see how that could be harmless but it seems to blur the 
> boundary between the features to me.

I know what you mean.  But, on the other hand, one of the real values of 
the new approach is that the 'escape language' supported by both kinds 
of string literals is _identical_; the only differences are the 
out-of-band characteristics (delimiter) and things that are directly 
related to 2D-embedding.  Having the two diverge gratuitously is 
accidental complexity.  (This issue will come back again when we talk 
about raw-ness too.)

> But I've lost track of why we need triple-quote to be different from 
> single-quote in the first place. /Could /the notion just be that if 
> you newline immediately after opening quote then you are asking for 
> MLS with everything that comes along with that?

Among other reasons, quotes.  Nearly 100% of the ML candidates have 
embedded quote characters in them; having to escape them would not be 
very satisfying.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/amber-spec-experts/attachments/20190426/3eadf381/attachment-0001.html>

More information about the amber-spec-experts mailing list