<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 14 May 2017, at 03:55, Xiaodi Wu &lt;<a href="mailto:xiaodi.wu@gmail.com" class="">xiaodi.wu@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">On Sat, May 13, 2017 at 1:42 AM, David Hart <span dir="ltr" class="">&lt;<a href="mailto:david@hartbit.com" target="_blank" class="">david@hartbit.com</a>&gt;</span> wrote:<br class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class=""><br class=""><div class=""><span class="gmail-"><blockquote type="cite" class=""><div class="">On 12 May 2017, at 23:14, Xiaodi Wu &lt;<a href="mailto:xiaodi.wu@gmail.com" target="_blank" class="">xiaodi.wu@gmail.com</a>&gt; wrote:</div><br class="gmail-m_154145646486779951Apple-interchange-newline"><div class="">I feel like a broken record: Of the three proposed components of the proposed solution, two were amply considered by the community and the core team in SE-0168. The decision has already been made _not_ to implement these ideas at this time.<br class=""></div></blockquote><div class=""><br class=""></div></span><div class="">Can you provide me with quote from the Core Team that it should not be implemented at this time? I have troubles finding it.</div><span class="gmail-"><br class=""><blockquote type="cite" class=""><div class="">Significant defects discovered after the fact during implementation or new insights after extensive usage can prompt revisiting the decision, but that is not the case here: implementation did not require further clarification and the feature has only just landed on master. We simply cannot revisit topics willy-nilly. The process simply cannot work that way: few have the time and energy to offer their fullest consideration the first time round, and no one would be willing to do that if it means that the same topic will be revisited one month later.<br class=""></div></blockquote><div class=""><br class=""></div></span><div class="">The concerns summarised in this proposal were only heavily discussed after the acceptance of multi-line strings. Therefore, there is a great chance that they were not discussed by the Core Team. We feel obliged to put this proposal forward to formalise those issues.</div></div></div></blockquote><div class=""><br class=""></div><div class=""><br class=""></div><div class="">[1]</div><div class=""><br class=""></div><div class="">Your draft proposes to '[d]ivorce the `"""` delimiter from [...] multi-line syntax' in order to allow `"""long strings"""` to be valid syntax.</div><div class=""><br class=""></div><div class="">SE-0168 proposed 'a single simple syntax for inclusion: """long strings"""`, explicitly permitting that syntax.</div><div class=""><br class=""></div><div class="">The core team, after considering SE-0168, deliberately rejected that feature for Swift 4. They wrote that they '<span style="white-space: pre-wrap;" class="">acknowledge[] that single-line triple quoted strings have other uses in other languages, [...] but supporting that alongside the indentation-stripping behavior leads to a lot of subtlety, and there could be other solutions to the escaping problem down the line, such as raw strings.' They concluded that: 'If nothing else, single-line triple quoted strings can be </span><span style="white-space: pre-wrap;" class="">considered later as an additive feature.' </span></div><div class=""><span style="white-space: pre-wrap;" class=""><br class=""></span></div><div class=""><span style="white-space: pre-wrap;" class="">[2]</span></div><div class=""><span style="white-space: pre-wrap;" class=""><br class=""></span></div><div class=""><span style="white-space: pre-wrap;" class="">Your draft proposes to 's</span><font class=""><span style="white-space:pre-wrap" class="">upport escaping newlines in multi-line strings with a trailing `\`'.</span></font></div><div class=""><font class=""><span style="white-space:pre-wrap" class=""><br class=""></span></font></div><div class=""><font class=""><span style="white-space:pre-wrap" class="">The core team, after considering SE-0168, acknowledged that '[d]</span></font><span style="white-space: pre-wrap;" class="">iscussion on the list raised the idea of allowing a line to end with \ to "escape" the newline and elide it from the value of the literal.' They deliberately rejected that feature for Swift 4, reasoning that '[they] had concerns about only allowing that inside multi-line literals and felt that that could also be considered later as an additive feature.'</span></div><div class=""><br class=""></div><div class=""><br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><div class="">If someone from the Core Team lets us know this is definitely out of scope for Swift 4, we’ll be happy to bring it back once discussion for Swift 5 starts.</div></div></div></blockquote><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Not being on the core team, I can't tell you what's definitely out of scope, but I'm pretty sure discussing something "down the line" and "later" don't mean revisiting a topic 22 days after the original proposal is modified and 16 days after it's implemented, but rather in a future version of Swift, after users have been able to try and gain experience with the approved design.</div></div></div></div></div></blockquote><div><br class=""></div><div>Thanks for the references! Indeed, those specific points were discussed but I’m not sure what they mean by "<span class="" style="white-space: pre-wrap;">can be </span><span class="" style="white-space: pre-wrap;">considered later as an additive feature”. I’m not so certain it necessarily pushes it back to a future version of Swift. Nonetheless, the other points in the proposal don’t seem to have been discussed.</span></div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><div class=""><div class="gmail-h5"><blockquote type="cite" class=""><div class=""><div class="gmail_quote"><div dir="ltr" class="">On Fri, May 12, 2017 at 15:51 David Hart via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class="">Hi swift-evolution,<div class=""><br class=""></div><div class="">Adrian Zubarev and I have discussed several issues with string literals still unresolved after the multi-line string literals proposals and we believe that they are important enough to address for Swift 4. Here is the pitch for our proposal.</div><div class=""><br class=""></div><div class="">Please let us know what you think:</div><div class=""><br class=""></div><div class=""><a href="https://github.com/hartbit/swift-evolution/blob/literal-string-improvements/proposals/XXXX-improve-string-literals.md" target="_blank" class="">https://github.com/hartbit/<wbr class="">swift-evolution/blob/literal-<wbr class="">string-improvements/proposals/<wbr class="">XXXX-improve-string-literals.<wbr class="">md</a></div><div class=""><br class=""></div><div class=""><h1 style="box-sizing:border-box;margin:0px 0px 16px;line-height:1.25;padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(234,236,239);color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';background-color:rgb(255,255,255)" class="">Improve String Literals</h1><ul style="box-sizing:border-box;padding-left:2em;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:16px;background-color:rgb(255,255,255)" class=""><li style="box-sizing:border-box" class="">Proposal:&nbsp;<a href="https://github.com/hartbit/swift-evolution/blob/literal-string-improvements/proposals/XXXX-improve-string-literals.md" style="box-sizing:border-box;background-color:transparent;color:rgb(3,102,214);text-decoration:none" target="_blank" class="">SE-XXXX</a></li><li style="box-sizing:border-box;margin-top:0.25em" class="">Authors:&nbsp;<a href="https://github.com/hartbit" style="box-sizing:border-box;background-color:transparent;color:rgb(3,102,214);text-decoration:none" target="_blank" class="">David Hart</a>,&nbsp;<a href="https://github.com/devandartist" style="box-sizing:border-box;background-color:transparent;color:rgb(3,102,214);text-decoration:none" target="_blank" class="">Adrian Zubarev</a></li><li style="box-sizing:border-box;margin-top:0.25em" class="">Review Manager: TBD</li><li style="box-sizing:border-box;margin-top:0.25em" class="">Status: TBD</li></ul><h2 style="box-sizing:border-box;margin-top:24px;margin-bottom:16px;line-height:1.25;padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(234,236,239);color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';background-color:rgb(255,255,255)" class=""><a id="gmail-m_154145646486779951m_-8182216364070455622user-content-introduction" class="gmail-m_154145646486779951m_-8182216364070455622anchor" href="https://github.com/hartbit/swift-evolution/blob/literal-string-improvements/proposals/XXXX-improve-string-literals.md#introduction" style="box-sizing:border-box;background-color:transparent;color:rgb(3,102,214);text-decoration:none;float:left;padding-right:4px;line-height:1" target="_blank"><u class=""></u><u class=""></u><u class=""></u><u class=""></u></a>Introduction</h2><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:16px;background-color:rgb(255,255,255)" class="">This proposal builds on top the new features of&nbsp;<a href="https://github.com/hartbit/swift-evolution/blob/literal-string-improvements/proposals/0168-multi-line-string-literals.md" style="box-sizing:border-box;background-color:transparent;color:rgb(3,102,214);text-decoration:none" target="_blank" class="">SE-0168 Multi-Line String Literals</a>&nbsp;by widening the use-cases for unescaped double-quotes and resolving certain issues around long lines in single and multi-line string literals.</p><h2 style="box-sizing:border-box;margin-top:24px;margin-bottom:16px;line-height:1.25;padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(234,236,239);color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';background-color:rgb(255,255,255)" class=""><a id="gmail-m_154145646486779951m_-8182216364070455622user-content-motivation" class="gmail-m_154145646486779951m_-8182216364070455622anchor" href="https://github.com/hartbit/swift-evolution/blob/literal-string-improvements/proposals/XXXX-improve-string-literals.md#motivation" style="box-sizing:border-box;background-color:transparent;color:rgb(3,102,214);text-decoration:none;float:left;padding-right:4px;line-height:1" target="_blank"><u class=""></u><u class=""></u><u class=""></u><u class=""></u></a>Motivation</h2><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:16px;background-color:rgb(255,255,255)" class="">In Swift 3, String literals have three pain points:</p><ul style="box-sizing:border-box;padding-left:2em;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:16px;background-color:rgb(255,255,255)" class=""><li style="box-sizing:border-box" class="">Strings containing double-quotes</li><li style="box-sizing:border-box;margin-top:0.25em" class="">Multi-line strings</li><li style="box-sizing:border-box;margin-top:0.25em" class="">Long single-line strings</li></ul><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:16px;background-color:rgb(255,255,255)" class="">Proposal&nbsp;<a href="https://github.com/hartbit/swift-evolution/blob/literal-string-improvements/proposals/0168-multi-line-string-literals.md" style="box-sizing:border-box;background-color:transparent;color:rgb(3,102,214);text-decoration:none" target="_blank" class="">SE-0168</a>&nbsp;fixed the two first problems with the same syntax. Unfortunately, while an improvement on Swift 3, several problems remain:</p><ul style="box-sizing:border-box;padding-left:2em;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:16px;background-color:rgb(255,255,255)" class=""><li style="box-sizing:border-box" class="">Long single-line strings still require the less than ideal concatenation syntax:</li></ul><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:16px;background-color:rgb(255,255,255)" class="">Some project styles (like the Standard Library) mandate a maximum line length, requiring long single-line strings to be hard-wrapped. This still requires odd solutions:</p><div class="gmail-m_154145646486779951m_-8182216364070455622highlight-source-swift gmail-m_154145646486779951m_-8182216364070455622highlight" style="box-sizing:border-box;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:16px;background-color:rgb(255,255,255)"><pre style="box-sizing:border-box;font-family:sfmono-regular,consolas,'liberation mono',menlo,courier,monospace;font-size:13.600000381469727px;margin-top:0px;margin-bottom:0px;line-height:1.45;word-wrap:normal;padding:16px;overflow:auto;background-color:rgb(246,248,250);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-break:normal" class=""><span class="gmail-m_154145646486779951m_-8182216364070455622pl-c1" style="box-sizing:border-box;color:rgb(0,134,179)">assert</span>(condition, <span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span>This is a long assertion message that requires <span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span></span> <span class="gmail-m_154145646486779951m_-8182216364070455622pl-k" style="box-sizing:border-box;color:rgb(167,29,93)">+</span>
    <span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span>string concatenation when the project style enforces maximum line <span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span></span> <span class="gmail-m_154145646486779951m_-8182216364070455622pl-k" style="box-sizing:border-box;color:rgb(167,29,93)">+</span>
    <span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span>lengths<span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span></span>)</pre></div><ul style="box-sizing:border-box;padding-left:2em;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:16px;background-color:rgb(255,255,255)" class=""><li style="box-sizing:border-box" class="">Long lines in a multi-line strings can't be manually wrapped:</li></ul><div class="gmail-m_154145646486779951m_-8182216364070455622highlight-source-swift gmail-m_154145646486779951m_-8182216364070455622highlight" style="box-sizing:border-box;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:16px;background-color:rgb(255,255,255)"><pre style="box-sizing:border-box;font-family:sfmono-regular,consolas,'liberation mono',menlo,courier,monospace;font-size:13.600000381469727px;margin-top:0px;margin-bottom:0px;line-height:1.45;word-wrap:normal;padding:16px;overflow:auto;background-color:rgb(246,248,250);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-break:normal" class=""><span class="gmail-m_154145646486779951m_-8182216364070455622pl-k" style="box-sizing:border-box;color:rgb(167,29,93)">let</span> markdown <span class="gmail-m_154145646486779951m_-8182216364070455622pl-k" style="box-sizing:border-box;color:rgb(167,29,93)">=</span> <span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)">    # Title<span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)">    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer elementum commodo sem, a congue orci porta sit amet. Duis facilisis, est et vehicula congue, turpis dui ultricies nunc, ut elementum quam elit nec felis. Integer aliquam id risus nec laoreet. Vivamus vitae odio sit amet quam iaculis fermentum nec sed neque.<span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)">    ## Subtitle<span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)">    Cras et nibh velit. Praesent eleifend sagittis quam, pellentesque lobortis lectus commodo vel. Vivamus suscipit, nulla quis blandit ullamcorper, velit neque euismod nibh, nec blandit mi diam molestie ex. Cras porttitor, est sed pharetra interdum, ipsum mauris viverra quam, sit amet eleifend purus elit sit amet odio.<span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)">    <span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span></span></pre></div><ul style="box-sizing:border-box;padding-left:2em;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:16px;background-color:rgb(255,255,255)" class=""><li style="box-sizing:border-box" class="">Short strings containing double-quotes have to use the multi-line syntax to benefit from unescaped double-quotes:</li></ul><div class="gmail-m_154145646486779951m_-8182216364070455622highlight-source-swift gmail-m_154145646486779951m_-8182216364070455622highlight" style="box-sizing:border-box;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:16px;background-color:rgb(255,255,255)"><pre style="box-sizing:border-box;font-family:sfmono-regular,consolas,'liberation mono',menlo,courier,monospace;font-size:13.600000381469727px;margin-top:0px;margin-bottom:0px;line-height:1.45;word-wrap:normal;padding:16px;overflow:auto;background-color:rgb(246,248,250);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-break:normal" class=""><span class="gmail-m_154145646486779951m_-8182216364070455622pl-c1" style="box-sizing:border-box;color:rgb(0,134,179)">print</span>(<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)">    { <span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span></span>success<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span>: false, <span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span></span>error<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span>: <span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span></span>Wrong parameter<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span> }<span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)">    <span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span></span>)</pre></div><h2 style="box-sizing:border-box;margin-top:24px;margin-bottom:16px;line-height:1.25;padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(234,236,239);color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';background-color:rgb(255,255,255)" class=""><a id="gmail-m_154145646486779951m_-8182216364070455622user-content-proposed-solution" class="gmail-m_154145646486779951m_-8182216364070455622anchor" href="https://github.com/hartbit/swift-evolution/blob/literal-string-improvements/proposals/XXXX-improve-string-literals.md#proposed-solution" style="box-sizing:border-box;background-color:transparent;color:rgb(3,102,214);text-decoration:none;float:left;padding-right:4px;line-height:1" target="_blank"><u class=""></u><u class=""></u><u class=""></u><u class=""></u></a>Proposed solution</h2><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:16px;background-color:rgb(255,255,255)" class="">By implementing multi-line string literals and support for unescaped double-quotes with the same syntax,&nbsp;<a href="https://github.com/hartbit/swift-evolution/blob/literal-string-improvements/proposals/0168-multi-line-string-literals.md" style="box-sizing:border-box;background-color:transparent;color:rgb(3,102,214);text-decoration:none" target="_blank" class="">SE-0168</a>&nbsp;has made those features unusable on their own. By dissociating them and supporting two extra syntax features, we can solve all the above problems:</p><h3 style="box-sizing:border-box;margin-top:24px;margin-bottom:16px;font-size:1.25em;line-height:1.25;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';background-color:rgb(255,255,255)" class=""><a id="gmail-m_154145646486779951m_-8182216364070455622user-content-divorce-the--delimiter-from-the-multi-line-syntax-and-have-them-only-support-unescaped-double-quotes" class="gmail-m_154145646486779951m_-8182216364070455622anchor" href="https://github.com/hartbit/swift-evolution/blob/literal-string-improvements/proposals/XXXX-improve-string-literals.md#divorce-the--delimiter-from-the-multi-line-syntax-and-have-them-only-support-unescaped-double-quotes" style="box-sizing:border-box;background-color:transparent;color:rgb(3,102,214);text-decoration:none;float:left;padding-right:4px;line-height:1" target="_blank"><u class=""></u><u class=""></u><u class=""></u><u class=""></u></a>Divorce the&nbsp;<code style="box-sizing:border-box;font-family:sfmono-regular,consolas,'liberation mono',menlo,courier,monospace;font-size:inherit;padding:0.2em 0px;margin:0px;background-color:rgba(27,31,35,0.0470588);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px" class="">"""</code>&nbsp;delimiter from the multi-line syntax and have them only support unescaped double-quotes</h3><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:16px;background-color:rgb(255,255,255)" class="">The change allows us to express short strings containing double-quotes without resorting to the multi-line syntax:</p><div class="gmail-m_154145646486779951m_-8182216364070455622highlight-source-swift gmail-m_154145646486779951m_-8182216364070455622highlight" style="box-sizing:border-box;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:16px;background-color:rgb(255,255,255)"><pre style="box-sizing:border-box;font-family:sfmono-regular,consolas,'liberation mono',menlo,courier,monospace;font-size:13.600000381469727px;margin-top:0px;margin-bottom:0px;line-height:1.45;word-wrap:normal;padding:16px;overflow:auto;background-color:rgb(246,248,250);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-break:normal" class=""><span class="gmail-m_154145646486779951m_-8182216364070455622pl-c1" style="box-sizing:border-box;color:rgb(0,134,179)">print</span>(<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span>{ <span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span></span>success<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span>: false, <span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span></span>error<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span>: <span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span></span>Wrong parameter<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span> }<span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span></span>)</pre></div><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:16px;background-color:rgb(255,255,255)" class="">As a consequence, multi-line strings are now only defined by a newline following the leading delimiter and the whitespace preceeding the trailing delimiter. They gain support for&nbsp;<code style="box-sizing:border-box;font-family:sfmono-regular,consolas,'liberation mono',menlo,courier,monospace;font-size:13.600000381469727px;padding:0.2em 0px;margin:0px;background-color:rgba(27,31,35,0.0470588);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px" class="">"</code>&nbsp;delimiters, which has the nice advantage of saving a few characters in multi-line strings which are known to never contain double-quotes:</p><div class="gmail-m_154145646486779951m_-8182216364070455622highlight-source-swift gmail-m_154145646486779951m_-8182216364070455622highlight" style="box-sizing:border-box;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:16px;background-color:rgb(255,255,255)"><pre style="box-sizing:border-box;font-family:sfmono-regular,consolas,'liberation mono',menlo,courier,monospace;font-size:13.600000381469727px;margin-top:0px;margin-bottom:0px;line-height:1.45;word-wrap:normal;padding:16px;overflow:auto;background-color:rgb(246,248,250);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-break:normal" class=""><span class="gmail-m_154145646486779951m_-8182216364070455622pl-c1" style="box-sizing:border-box;color:rgb(0,134,179)">print</span>(<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)">    Triple <span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span></span> are still valid delimiters
    <span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span>)<span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)">query(<span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span></span>
    SELECT 'name'
    FROM 'people'
    WHERE age <span class="gmail-m_154145646486779951m_-8182216364070455622pl-k" style="box-sizing:border-box;color:rgb(167,29,93)">&gt;</span> <span class="gmail-m_154145646486779951m_-8182216364070455622pl-c1" style="box-sizing:border-box;color:rgb(0,134,179)">20</span>
    <span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span>)<span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span></pre></div><h3 style="box-sizing:border-box;margin-top:24px;margin-bottom:16px;font-size:1.25em;line-height:1.25;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';background-color:rgb(255,255,255)" class=""><a id="gmail-m_154145646486779951m_-8182216364070455622user-content-support-escaping-newlines-in-multi-line-strings-with-a-trailing-" class="gmail-m_154145646486779951m_-8182216364070455622anchor" href="https://github.com/hartbit/swift-evolution/blob/literal-string-improvements/proposals/XXXX-improve-string-literals.md#support-escaping-newlines-in-multi-line-strings-with-a-trailing-" style="box-sizing:border-box;background-color:transparent;color:rgb(3,102,214);text-decoration:none;float:left;padding-right:4px;line-height:1" target="_blank"><u class=""></u><u class=""></u><u class=""></u><u class=""></u></a>Support escaping newlines in multi-line strings with a trailing&nbsp;<code style="box-sizing:border-box;font-family:sfmono-regular,consolas,'liberation mono',menlo,courier,monospace;font-size:inherit;padding:0.2em 0px;margin:0px;background-color:rgba(27,31,35,0.0470588);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px" class="">\</code></h3><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:16px;background-color:rgb(255,255,255)" class="">This change allows hard-wrapping long lines in multi-line strings. They also have the added benefit of making trailing white-space at the end of source-code lines explicit.</p><div class="gmail-m_154145646486779951m_-8182216364070455622highlight-source-swift gmail-m_154145646486779951m_-8182216364070455622highlight" style="box-sizing:border-box;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:16px;background-color:rgb(255,255,255)"><pre style="box-sizing:border-box;font-family:sfmono-regular,consolas,'liberation mono',menlo,courier,monospace;font-size:13.600000381469727px;margin-top:0px;margin-bottom:0px;line-height:1.45;word-wrap:normal;padding:16px;overflow:auto;background-color:rgb(246,248,250);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-break:normal" class=""><span class="gmail-m_154145646486779951m_-8182216364070455622pl-k" style="box-sizing:border-box;color:rgb(167,29,93)">let</span> markdown <span class="gmail-m_154145646486779951m_-8182216364070455622pl-k" style="box-sizing:border-box;color:rgb(167,29,93)">=</span> <span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)">    # Title<span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)">    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer \<span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)">    elementum commodo sem, a congue orci porta sit amet. Duis facilisis, est \<span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)">    et vehicula congue, turpis dui ultricies nunc, ut elementum quam elit nec \<span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)">    felis. Integer aliquam id risus nec laoreet. Vivamus vitae odio sit amet \<span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)">    quam iaculis fermentum nec sed neque.<span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)">    ## Subtitle<span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)">    Cras et nibh velit. Praesent eleifend sagittis quam, pellentesque \<span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)">    lobortis lectus commodo vel. Vivamus suscipit, nulla quis blandit \<span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)">    ullamcorper, velit neque euismod nibh, nec blandit mi diam molestie \<span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)">    ex. Cras porttitor, est sed pharetra interdum, ipsum mauris viverra \<span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)">    quam, sit amet eleifend purus elit sit amet odio.<span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)">    <span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span></span></pre></div><h3 style="box-sizing:border-box;margin-top:24px;margin-bottom:16px;font-size:1.25em;line-height:1.25;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';background-color:rgb(255,255,255)" class=""><a id="gmail-m_154145646486779951m_-8182216364070455622user-content-adopt-the-cobjective-c-syntax-that-concatenates-single-line-strings" class="gmail-m_154145646486779951m_-8182216364070455622anchor" href="https://github.com/hartbit/swift-evolution/blob/literal-string-improvements/proposals/XXXX-improve-string-literals.md#adopt-the-cobjective-c-syntax-that-concatenates-single-line-strings" style="box-sizing:border-box;background-color:transparent;color:rgb(3,102,214);text-decoration:none;float:left;padding-right:4px;line-height:1" target="_blank"><u class=""></u><u class=""></u><u class=""></u><u class=""></u></a>Adopt the C/Objective-C syntax that concatenates single-line strings</h3><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:16px;background-color:rgb(255,255,255)" class="">This change will be familiar to C developers and provides a cleaner and more performant solution for long single-line strings:</p><div class="gmail-m_154145646486779951m_-8182216364070455622highlight-source-swift gmail-m_154145646486779951m_-8182216364070455622highlight" style="box-sizing:border-box;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:16px;background-color:rgb(255,255,255)"><pre style="box-sizing:border-box;font-family:sfmono-regular,consolas,'liberation mono',menlo,courier,monospace;font-size:13.600000381469727px;margin-top:0px;margin-bottom:0px;line-height:1.45;word-wrap:normal;padding:16px;overflow:auto;background-color:rgb(246,248,250);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-break:normal" class=""><span class="gmail-m_154145646486779951m_-8182216364070455622pl-c1" style="box-sizing:border-box;color:rgb(0,134,179)">assert</span>(condition, <span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span>This is a long assertion message that flows <span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span></span>
    <span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span>from one line to the next without requiring the concatenation <span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span></span>
    <span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span>operator<span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span></span>)

<span class="gmail-m_154145646486779951m_-8182216364070455622pl-c1" style="box-sizing:border-box;color:rgb(0,134,179)">assert</span>(condition, <span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span>This is another <span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span></span>single<span class="gmail-m_154145646486779951m_-8182216364070455622pl-k" style="box-sizing:border-box;color:rgb(167,29,93)">-</span>line<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span> message that <span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span></span>
    <span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span>supports up to two double-quotes (<span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span></span> and <span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span></span>) without any <span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)">    <span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span></span>escaping<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span>)<span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span></pre></div><h2 style="box-sizing:border-box;margin-top:24px;margin-bottom:16px;line-height:1.25;padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(234,236,239);color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';background-color:rgb(255,255,255)" class=""><a id="gmail-m_154145646486779951m_-8182216364070455622user-content-source-compatibility" class="gmail-m_154145646486779951m_-8182216364070455622anchor" href="https://github.com/hartbit/swift-evolution/blob/literal-string-improvements/proposals/XXXX-improve-string-literals.md#source-compatibility" style="box-sizing:border-box;background-color:transparent;color:rgb(3,102,214);text-decoration:none;float:left;padding-right:4px;line-height:1" target="_blank"><u class=""></u><u class=""></u><u class=""></u><u class=""></u></a>Source compatibility</h2><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:16px;background-color:rgb(255,255,255)" class="">This feature is purely additive; it has no effect on source compatibility.</p><h2 style="box-sizing:border-box;margin-top:24px;margin-bottom:16px;line-height:1.25;padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(234,236,239);color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';background-color:rgb(255,255,255)" class=""><a id="gmail-m_154145646486779951m_-8182216364070455622user-content-effect-on-abi-stability" class="gmail-m_154145646486779951m_-8182216364070455622anchor" href="https://github.com/hartbit/swift-evolution/blob/literal-string-improvements/proposals/XXXX-improve-string-literals.md#effect-on-abi-stability" style="box-sizing:border-box;background-color:transparent;color:rgb(3,102,214);text-decoration:none;float:left;padding-right:4px;line-height:1" target="_blank"><u class=""></u><u class=""></u><u class=""></u><u class=""></u></a>Effect on ABI stability</h2><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:16px;background-color:rgb(255,255,255)" class="">This feature is purely additive; it has no effect on ABI stability.</p><h2 style="box-sizing:border-box;margin-top:24px;margin-bottom:16px;line-height:1.25;padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(234,236,239);color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';background-color:rgb(255,255,255)" class=""><a id="gmail-m_154145646486779951m_-8182216364070455622user-content-effect-on-api-resilience" class="gmail-m_154145646486779951m_-8182216364070455622anchor" href="https://github.com/hartbit/swift-evolution/blob/literal-string-improvements/proposals/XXXX-improve-string-literals.md#effect-on-api-resilience" style="box-sizing:border-box;background-color:transparent;color:rgb(3,102,214);text-decoration:none;float:left;padding-right:4px;line-height:1" target="_blank"><u class=""></u><u class=""></u><u class=""></u><u class=""></u></a>Effect on API resilience</h2><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:16px;background-color:rgb(255,255,255)" class="">This feature is purely additive; it has no effect on API resilience.</p><h2 style="box-sizing:border-box;margin-top:24px;margin-bottom:16px;line-height:1.25;padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(234,236,239);color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';background-color:rgb(255,255,255)" class=""><a id="gmail-m_154145646486779951m_-8182216364070455622user-content-alternatives-considered" class="gmail-m_154145646486779951m_-8182216364070455622anchor" href="https://github.com/hartbit/swift-evolution/blob/literal-string-improvements/proposals/XXXX-improve-string-literals.md#alternatives-considered" style="box-sizing:border-box;background-color:transparent;color:rgb(3,102,214);text-decoration:none;float:left;padding-right:4px;line-height:1" target="_blank"><u class=""></u><u class=""></u><u class=""></u><u class=""></u></a>Alternatives considered</h2><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:16px;background-color:rgb(255,255,255)" class="">A different syntax for supporting long single-line strings was discussed where ending delimiters were replaced with the&nbsp;<code style="box-sizing:border-box;font-family:sfmono-regular,consolas,'liberation mono',menlo,courier,monospace;font-size:13.600000381469727px;padding:0.2em 0px;margin:0px;background-color:rgba(27,31,35,0.0470588);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px" class="">\</code>escaping character, mirroring their use in multi-line strings:</p><div class="gmail-m_154145646486779951m_-8182216364070455622highlight-source-swift gmail-m_154145646486779951m_-8182216364070455622highlight" style="box-sizing:border-box;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:16px;background-color:rgb(255,255,255)"><pre style="box-sizing:border-box;font-family:sfmono-regular,consolas,'liberation mono',menlo,courier,monospace;font-size:13.600000381469727px;margin-top:0px;margin-bottom:0px;line-height:1.45;word-wrap:normal;padding:16px;overflow:auto;background-color:rgb(246,248,250);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-break:normal" class=""><span class="gmail-m_154145646486779951m_-8182216364070455622pl-c1" style="box-sizing:border-box;color:rgb(0,134,179)">assert</span>(condition, <span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span>This is a long assertion message that flows \<span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)">    <span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span></span>from one line to the next without requiring the concatenation \
    <span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span>operator<span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span></span>)

<span class="gmail-m_154145646486779951m_-8182216364070455622pl-c1" style="box-sizing:border-box;color:rgb(0,134,179)">assert</span>(condition, <span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span>This is another <span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span></span>single<span class="gmail-m_154145646486779951m_-8182216364070455622pl-k" style="box-sizing:border-box;color:rgb(167,29,93)">-</span>line<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span> message that \<span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)">    <span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span></span>supports up to two double<span class="gmail-m_154145646486779951m_-8182216364070455622pl-k" style="box-sizing:border-box;color:rgb(167,29,93)">-</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-c1" style="box-sizing:border-box;color:rgb(0,134,179)">quotes</span> (<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span> and <span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span>) without any \<span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span>
<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)">    <span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span></span>escaping<span class="gmail-m_154145646486779951m_-8182216364070455622pl-s" style="box-sizing:border-box;color:rgb(24,54,145)"><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span><span class="gmail-m_154145646486779951m_-8182216364070455622pl-pds" style="box-sizing:border-box">"</span>)<span class="gmail-m_154145646486779951m_-8182216364070455622pl-ii" style="box-sizing:border-box;color:rgb(248,248,248);background-color:rgb(181,42,29)"></span></span></pre></div><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:16px;background-color:rgb(255,255,255)" class="">That syntax saved two characters per line in strings with&nbsp;<code style="box-sizing:border-box;font-family:sfmono-regular,consolas,'liberation mono',menlo,courier,monospace;font-size:13.600000381469727px;padding:0.2em 0px;margin:0px;background-color:rgba(27,31,35,0.0470588);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px" class="">"""</code>&nbsp;delimiters but had several disadvantages:</p><ul style="box-sizing:border-box;padding-left:2em;margin-top:0px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,'segoe ui',helvetica,arial,sans-serif,'apple color emoji','segoe ui emoji','segoe ui symbol';font-size:16px;background-color:rgb(255,255,255);margin-bottom:0px" class=""><li style="box-sizing:border-box" class="">It loses the familiarity with C syntax</li><li style="box-sizing:border-box;margin-top:0.25em" class="">It introduces an asymmetry between the last line and those above</li><li style="box-sizing:border-box;margin-top:0.25em" class="">It does not do any actual escaping, introducing developer ambiguity with their use in multi-line literals</li></ul><div class=""><br class=""></div></div></div>______________________________<wbr class="">_________________<br class="">
swift-evolution mailing list<br class="">
<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/<wbr class="">mailman/listinfo/swift-<wbr class="">evolution</a><br class="">
</blockquote></div>
</div></blockquote></div></div></div><br class=""></div></blockquote></div><br class=""></div></div>
</div></blockquote></div><br class=""></body></html>