<html><head><style>
body {
        font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
        padding:1em;
        margin:auto;
        background:#fefefe;
}

h1, h2, h3, h4, h5, h6 {
        font-weight: bold;
}

h1 {
        color: #000000;
        font-size: 28pt;
}

h2 {
        border-bottom: 1px solid #CCCCCC;
        color: #000000;
        font-size: 24px;
}

h3 {
        font-size: 18px;
}

h4 {
        font-size: 16px;
}

h5 {
        font-size: 14px;
}

h6 {
        color: #777777;
        background-color: inherit;
        font-size: 14px;
}

hr {
        height: 0.2em;
        border: 0;
        color: #CCCCCC;
        background-color: #CCCCCC;
    display: inherit;
}

p, blockquote, ul, ol, dl, li, table, pre {
        margin: 15px 0;
}

a, a:visited {
        color: #4183C4;
        background-color: inherit;
        text-decoration: none;
}

#message {
        border-radius: 6px;
        border: 1px solid #ccc;
        display:block;
        width:100%;
        height:60px;
        margin:6px 0px;
}

button, #ws {
        font-size: 12 pt;
        padding: 4px 6px;
        border-radius: 5px;
        border: 1px solid #bbb;
        background-color: #eee;
}

code, pre, #ws, #message {
        font-family: Monaco;
        font-size: 10pt;
        border-radius: 3px;
        background-color: #F8F8F8;
        color: inherit;
}

code {
        border: 1px solid #EAEAEA;
        margin: 0 2px;
        padding: 0 5px;
}

pre {
        border: 1px solid #CCCCCC;
        overflow: auto;
        padding: 4px 8px;
}

pre > code {
        border: 0;
        margin: 0;
        padding: 0;
}

#ws { background-color: #f8f8f8; }


.bloop_markdown table {
border-collapse: collapse;  
font-family: Helvetica, arial, freesans, clean, sans-serif;  
color: rgb(51, 51, 51);  
font-size: 15px; line-height: 25px;
padding: 0; }

.bloop_markdown table tr {
border-top: 1px solid #cccccc;
background-color: white;
margin: 0;
padding: 0; }
     
.bloop_markdown table tr:nth-child(2n) {
background-color: #f8f8f8; }

.bloop_markdown table tr th {
font-weight: bold;
border: 1px solid #cccccc;
margin: 0;
padding: 6px 13px; }

.bloop_markdown table tr td {
border: 1px solid #cccccc;
margin: 0;
padding: 6px 13px; }

.bloop_markdown table tr th :first-child, table tr td :first-child {
margin-top: 0; }

.bloop_markdown table tr th :last-child, table tr td :last-child {
margin-bottom: 0; }

.bloop_markdown blockquote{
  border-left: 4px solid #dddddd;
  padding: 0 15px;
  color: #777777; }
  blockquote > :first-child {
    margin-top: 0; }
  blockquote > :last-child {
    margin-bottom: 0; }

code, pre, #ws, #message {
    word-break: normal;
    word-wrap: normal;
}

hr {
    display: inherit;
}

.bloop_markdown :first-child {
    -webkit-margin-before: 0;
}

code, pre, #ws, #message {
    font-family: Menlo, Consolas, Liberation Mono, Courier, monospace;
}


.send { color:#77bb77; }
.server { color:#7799bb; }
.error { color:#AA0000; }</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class="bloop_markdown"><p>One more thing I wanted to add.</p>

<p>I would remove the restriction of </p>

<blockquote>
<p>An escape character at the end of the last line of a literal is an error, as no newlines follow.</p>
</blockquote>

<p>from this proposal and allow the trailing backslash in the last line which won’t do harm to anything. The idea behind this is that one could annotate whitespaces in the last line:</p>

<pre><code>"""
My very long string&lt;space&gt;\
in Swift 👻&lt;space&gt;&lt;space&gt;&lt;space&gt;\
"""
</code></pre>

<p></p></div><div class="bloop_original_html"><style>body{font-family:Helvetica,Arial;font-size:13px}</style><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div> <br> <div id="bloop_sign_1499926757989923840" class="bloop_sign"><div style="font-family:helvetica,arial;font-size:13px">--&nbsp;<br>Adrian Zubarev<br>Sent with Airmail</div></div> <br><p class="airmail_on">On 13. July 2017 at 08:14:03, Adrian Zubarev (<a href="mailto:adrian.zubarev@devandartist.com">adrian.zubarev@devandartist.com</a>) wrote:</p> <blockquote type="cite" class="clean_bq"><span><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div></div><div>




<title></title>



<div class="bloop_markdown">
<p>Can you please elaborate?</p>
<p>—</p>
<p>In general I, as one of the co-authors, am for this additional
change. However, personally I would be against adding the new line
escaping feature to the single double-quote string literal, because
it will create asymmetry.</p>
<p>For instance in a future proposal it’s likely we’d also allow
the multi-line string literal <code>"""</code> to be written in a
single line without any new line escaping, for strings that contain
lots of double-quotes:</p>
<pre><code>let myString1 = """{"id": "OpenNew", "label": "Open New"}"""

// old and current version
let myString2 = "{\"id\": \"OpenNew\", \"label\": \"Open New\"}"
</code></pre>
<p>Considering that proposal would be accepted we’d have two ways
to express the multi-line string literal:</p>
<pre><code>// horizontal
"""Swift"""

// vertical
"""
Swift
"""
</code></pre>
<p>Now about the previously mentioned asymmetry, if we’d accept in
the current proposal and include new line escaping in a single
double-quoted string literal eventually someone will find that
again <em>inconsistent</em> and ask to align
<code>"""</code>-literal to allow:</p>
<pre><code>"""abc \
def"""
     
// Symmetrical counterpart is from the current proposal
"abc \
def"
</code></pre>
<p>However this model was completely abandoned by the previous
proposal and should be avoided at all cost even in the future,
because it does not any value to the expressiveness, but only
complicates the model.</p>
<p>—</p>
<p>On the other hand if we’re really considering adding this to
<code>"</code>-literal, then it should be only possible if the
<code>"</code>-literal gets a similar <em>vertical</em> version
like the <code>"""</code>-literal.</p>
<p>Notice that in that scenario:</p>
<ul>
<li>we need borrow the indent mechanism from <code>"""</code></li>
<li>the trailing <code>\</code> can be omitted after the last
character on the current string line</li>
<li>the trailing <code>\</code> is only used for annotate trailing
whitespaces (<code>"</code>-liteal does not add implicit new lines
at all, it’s always should stay explicit about everything)</li>
</ul>
<p>Something like that:</p>
<pre><code>// #1
"
a\
b\
" == "ab"

// #1.1
"
a
b
" == "ab"

// #2
"
a \
b \
" == "a b "

// #3
"
 c \
 d \
" == " c  d "
</code></pre>
<p>By now it should be clearly visible that this extension for the
<code>"</code>-literal does not add anything what the
<code>"""</code>-literal cannot already solve nicely!</p>
<p>That said, let’s keep it simple and only add the <code>\</code>
to vertical <code>"""</code>-literal.</p>
</div>
<div class="bloop_original_html">

<div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">
<br></div>
<br>
<div id="bloop_sign_1499924527868974848" class="bloop_sign">
<div style="font-family:helvetica,arial;font-size:13px">
--&nbsp;<br>
Adrian Zubarev<br>
Sent with Airmail</div>
</div>
<br>
<p class="airmail_on">On 13. July 2017 at 02:10:30, Taylor Swift
via swift-evolution (<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>)
wrote:</p>
<blockquote type="cite" class="clean_bq">
<div>
<div>
<div dir="ltr"><span>as is, this will mess up the “collapse”
feature in most text editors,, it should not be added unless
indentation removal is added too<br></span></div>
<div class="gmail_extra"><span><br></span>
<div class="gmail_quote"><span>On Wed, Jul 12, 2017 at 7:48 PM,
T.J. Usiyan via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span>
wrote:<br></span>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">+1&nbsp;
<div><br></div>
<div>Maintaining parity between single and multi line strings is
nice even though breaking scope is a strong argument against
actually using this with single line literals.&nbsp;</div>
</div>
<div class="HOEnZb">
<div class="h5">
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Jul 12, 2017 at 7:15 PM, Timothy
Wood via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
+1 This seems great to me.&nbsp; It seems worth calling out how
escaping of backslashes and escaping of newlines interact for
testing:<br>
<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; let s = """<br>
&nbsp; &nbsp; &nbsp; &nbsp; line fragment ending in backslash
\\\<br>
&nbsp; &nbsp; &nbsp; &nbsp; and<br>
&nbsp; &nbsp; &nbsp; &nbsp; line fragment ending in backslash
\\\<br>
&nbsp; &nbsp; &nbsp; &nbsp; \\followed by line fragment starting
with backslash<br>
&nbsp; &nbsp; &nbsp; &nbsp; """<br>
<br>
I would expect to get "line fragment ending in backslash
\\and\nline fragment ending in backslash\\\\followed by line
fragment starting with backslash”, that is, escaped backslashes at
the end of line fragments should be retained, and whatever
concatenates line fragments shouldn’t accidentally double-interpret
backslashes.<br>
<br>
Alternatively:<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; let s = """<br>
&nbsp; &nbsp; &nbsp; &nbsp; line ending in backslash \\<br>
&nbsp; &nbsp; &nbsp; &nbsp; and<br>
&nbsp; &nbsp; &nbsp; &nbsp; line ending in backslash \\<br>
&nbsp; &nbsp; &nbsp; &nbsp; \\followed by line starting with
backslash<br>
&nbsp; &nbsp; &nbsp; &nbsp; """<br>
<br>
seems like it should produce the result "line ending in backslash
\\\nand\nline ending in backslash\\\n\\followed by line starting
with backslash”, that is, the consumption of escaped backslashes
should happen before considering if there is an extra backslash on
the end of the line for an escaped newline.<br>
<br>
-tim<br>
<div class="m_-944892645906478698HOEnZb">
<div class="m_-944892645906478698h5"><br>
<br>
<br>
&gt; On Jul 12, 2017, at 3:52 PM, Chris Lattner via swift-evolution
&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br>
&gt;<br>
&gt; Hello Swift community,<br>
&gt;<br>
&gt; Context: As part of winding down work on Swift 4, we are
considering SE-0182 as a refinement to SE-0168.&nbsp; We are
specifically not opening the floodgates for new proposals just yet,
and it is not considered in scope to resyntax all of multi-line
string literals.&nbsp; We’re just discussing this one potential
small-scope refinement to an existing Swift 4 feature.<br>
&gt;<br>
&gt;<br>
&gt; The review of "String Newline Escaping" begins now and runs
through July 17, 2017. The proposal is available here:<br>
&gt; <a href="https://github.com/apple/swift-evolution/blob/master/proposals/0182-newline-escape-in-strings.md" rel="noreferrer" target="_blank">https://github.com/apple/swift<wbr>-evolution/blob/master/proposa<wbr>ls/0182-newline-escape-in-<wbr>strings.md</a><br>

&gt;<br>
&gt; Reviews are an important part of the Swift evolution process.
All reviews should be sent to the swift-evolution mailing list
at<br>
&gt; <a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailma<wbr>n/listinfo/swift-evolution</a><br>

&gt;<br>
&gt; or, if you would like to keep your feedback private, directly
to the review manager. When replying, please try to keep the
proposal link at the top of the message:<br>
&gt;<br>
&gt; What goes into a review?<br>
&gt;<br>
&gt; The goal of the review process is to improve the proposal
under review through constructive criticism and, eventually,
determine the direction of Swift. When writing your review, here
are some questions you might want to answer in your review:<br>
&gt;<br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp;• What is your evaluation of the
proposal?<br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp;• Is the problem being addressed
significant enough to warrant a change to Swift?<br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp;• Does this proposal fit well with
the feel and direction of Swift?<br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp;• If you have used other languages
or libraries with a similar feature, how do you feel that this
proposal compares to those?<br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp;• How much effort did you put into
your review? A glance, a quick reading, or an in-depth study?<br>
&gt;<br>
&gt; More information about the Swift evolution process is
available at:<br>
&gt; <a href="https://github.com/apple/swift-evolution/blob/master/process.md" rel="noreferrer" target="_blank">https://github.com/apple/swift<wbr>-evolution/blob/master/process<wbr>.md</a><br>

&gt;<br>
&gt;<br>
&gt; Thank you,<br>
&gt;<br>
&gt; Chris Lattner<br>
&gt; Review Manager<br>
&gt; ______________________________<wbr>_________________<br>
&gt; swift-evolution mailing list<br>
&gt; <a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
&gt; <a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailma<wbr>n/listinfo/swift-evolution</a><br>

<br>
______________________________<wbr>_________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailma<wbr>n/listinfo/swift-evolution</a><br>
</div>
</div>
</blockquote>
</div>
<br></div>
</div>
</div>
<br>
______________________________<wbr>_________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>

<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-<wbr>evolution</a><br>

<br></blockquote>
</div>
<br></div>
_______________________________________________<br>
swift-evolution mailing list<br>
swift-evolution@swift.org<br>
https://lists.swift.org/mailman/listinfo/swift-evolution<br></div>
</div>
</blockquote>
</div>
<div class="bloop_markdown"></div>


</div></div></span></blockquote></div><div class="bloop_markdown"><p></p></div></body></html>