<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=""><div><br class=""><font color="#5856d6" class=""><br class=""></font><blockquote type="cite" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">On Apr 21, 2017, at 12:58 PM, Xiaodi Wu <<a href="mailto:xiaodi.wu@gmail.com" class="">xiaodi.wu@gmail.com</a>> wrote:<br class=""><blockquote type="cite" class=""></blockquote><font color="#00afcd" class=""><br class=""></font><div class=""><div dir="ltr" class="">Sorry, I don't follow. What's this about paragraphs?</div></div></div></div></blockquote><font color="#5856d6" class=""><br class=""></font>This was a common example of the many types of textual input that would benefit from concatenation characters in multiline text. Using ‘\’ as a continuation/concatenation character has been in common use for decades. Refer to the usage section here: <a href="https://en.wikipedia.org/wiki/Backslash" class="">https://en.wikipedia.org/wiki/Backslash</a></div><div><font color="#5856d6" class=""><br class=""></font>I am sure that you can find many examples if you care to search for them.<br class=""><font color="#5856d6" class=""><br class=""><br class=""></font><blockquote type="cite" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><font color="#00afcd" class=""><br class=""><br class=""></font>On Fri, Apr 21, 2017 at 1:56 PM, Christopher Kornher <span dir="ltr" class=""><<a href="mailto:ckornher@me.com" target="_blank" class="">ckornher@me.com</a>></span> wrote:<br class=""><font color="#00afcd" class=""><br class=""></font><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><div class=""><div class="h5">On Apr 21, 2017, at 12:48 PM, Xiaodi Wu via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>> wrote:<br class=""><blockquote type="cite" class=""></blockquote><font color="#12c00e" class=""><br class=""></font>On Fri, Apr 21, 2017 at 1:45 PM, Erica Sadun <span dir="ltr" class=""><<a href="mailto:erica@ericasadun.com" target="_blank" class="">erica@ericasadun.com</a>></span> wrote:<br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><br class=""><br class=""><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=""><span class="m_-7119851277634158807gmail-"><div class="">On Apr 21, 2017, at 12:40 PM, Xiaodi Wu via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>> wrote:<br class=""><blockquote type="cite" class=""></blockquote><br class="">On Fri, Apr 21, 2017 at 8:48 AM, Robert Bennett via swift-evolution <span dir="ltr" class=""><<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>></span> wrote:<br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote">Xiaodi, I think one thing you're neglecting is that users may never print out a multiline literal string at all. A string might never be printed or read by a human outside of the code it resides in. In this case it seems perfectly reasonable to ask that it be possible to format the string nicely in the code and disregard how it would actually be printed.<br class=""></div></div></div></div></blockquote><br class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class="">Can you give an example of such a use case, where a string is never seen by a human but one cannot insert literal newlines and would need elided ones instead?</div></div></div></div></div></div></span></div></blockquote>The most common reason is that the code is maintained by a (non-human) developer, who wants to be able to see and update the code in a readable form, but that represents a single line that will automatically wrapped by, for example, a UITextView for (human) consumption. <br class=""></div></div></div></div></blockquote><font color="#12c00e" class=""><br class=""></font><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class="">A different scenario from what Robert's describing, but sure. This goes to my question to David Hart. Isn't this an argument for a feature to allow breaking a single-line string literal across multiple lines? What makes this a use case for some feature for _multiline_ string literals in particular?</div></div></div></div></div></div></div></div></div></blockquote><br class="">paragraphs are denoted by `\n` in almost every rich text tool / library<br class=""><br class=""><br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><span class="">______________________________<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=""><div class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/<wbr class="">mailman/listinfo/swift-<wbr class="">evolution</a><br class=""></div></span></div></div></blockquote></div></div></div>
</div></blockquote></div></div></blockquote><blockquote type="cite" class="">Begin forwarded message:<br class=""><blockquote type="cite" class=""></blockquote><font color="#5856d6" class=""><br class=""></font><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class=""><b class="">From: </b></span><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class="">Christopher Kornher <<a href="mailto:ckornher@me.com" class="">ckornher@me.com</a>></span><br class=""><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class=""><b class="">Subject: </b></span><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class=""><b class="">Re: [swift-evolution] [Accepted] SE-0168: Multi-Line String Literals</b></span><br class=""><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class=""><b class="">Date: </b></span><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class="">April 21, 2017 at 12:56:54 PM MDT</span><br class=""><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class=""><b class="">To: </b></span><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class="">Xiaodi Wu <<a href="mailto:xiaodi.wu@gmail.com" class="">xiaodi.wu@gmail.com</a>></span><br class=""><blockquote type="cite" class=""></blockquote><font color="#5856d6" class=""><br class=""><br class=""></font><blockquote type="cite" class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">On Apr 21, 2017, at 12:48 PM, Xiaodi Wu via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<br class=""><blockquote type="cite" class=""></blockquote><font color="#00afcd" class=""><br class=""></font>On Fri, Apr 21, 2017 at 1:45 PM, Erica Sadun <span dir="ltr" class=""><<a href="mailto:erica@ericasadun.com" target="_blank" class="">erica@ericasadun.com</a>></span> wrote:<br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><br class=""><br class=""><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=""><span class="gmail-"><div class="">On Apr 21, 2017, at 12:40 PM, Xiaodi Wu via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>> wrote:<br class=""><blockquote type="cite" class=""></blockquote><font color="#12c00e" class=""><br class=""></font>On Fri, Apr 21, 2017 at 8:48 AM, Robert Bennett via swift-evolution <span dir="ltr" class=""><<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>></span> wrote:<br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote">Xiaodi, I think one thing you're neglecting is that users may never print out a multiline literal string at all. A string might never be printed or read by a human outside of the code it resides in. In this case it seems perfectly reasonable to ask that it be possible to format the string nicely in the code and disregard how it would actually be printed.<br class=""></div></div></div></div></blockquote><font color="#12c00e" class=""><br class=""></font><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class="">Can you give an example of such a use case, where a string is never seen by a human but one cannot insert literal newlines and would need elided ones instead?</div></div></div></div></div></div></span></div></blockquote>The most common reason is that the code is maintained by a (non-human) developer, who wants to be able to see and update the code in a readable form, but that represents a single line that will automatically wrapped by, for example, a UITextView for (human) consumption. <br class=""></div></div></div></div></blockquote><font color="#00afcd" class=""><br class=""></font><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class="">A different scenario from what Robert's describing, but sure. This goes to my question to David Hart. Isn't this an argument for a feature to allow breaking a single-line string literal across multiple lines? What makes this a use case for some feature for _multiline_ string literals in particular?</div></div></div></div></div></div></div></blockquote><font color="#5856d6" class=""><br class=""></font>paragraphs are denoted by `\n` in almost every rich text tool / library<br class=""><font color="#5856d6" class=""><br class=""><br class=""></font></blockquote><blockquote type="cite" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class=""><div class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div></div></div></blockquote></div><br class=""></body></html>