<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="">Hey Brent,<div class=""><br class=""></div><div class="">thanks a lot for working on multi-line strings!</div><div class=""><br class=""></div><div class="">You were also talking about <span style="font-family: Menlo; font-size: 14px; background-color: rgb(255, 255, 255);" class="">"</span><span style="font-family: Menlo; font-size: 14px; background-color: rgb(255, 255, 255);" class="">""</span> heredocs.</div><div class="">I really liked that idea.</div><div class="">Have you abandoned this concept?</div><div class=""><br class=""></div><div class="">Given that triple-quotes in Swift are already quite different from the Python version,</div><div class="">we could as well go one step further and introduce quoted here-docs.</div><div class=""><br class=""></div><div class="">E.g.:</div><div class=""><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><div style="margin: 0px; line-height: normal;" class=""><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">print(""")</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Hello world.</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">""" </span></div><div style="font-size: 14px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div></div></div></div><div class="">Is there any interest in something like this?</div><div class="">Should I invest some time in drafting a specification/proposal?</div><div class=""><br class=""></div><div class="">— Martin</div><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">Am 12.04.2017 um 15:40 schrieb Brent Royal-Gordon via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>>:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hey folks,<br class=""><br class=""><br class="">We've revised the proposal again. The main difference: You no longer need an initial newline to enable indentation stripping, and stripping no longer removes that newline even if it is present. (Adrian Zubarev and I believe some others argued for this.) We disagreed with this at first, but it made more sense as we thought about it more. There are a few things we like about it:<br class=""><br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>1. The rules and algorithm are simpler.<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>2. It accommodates more coding styles.<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>3. Every non-escaped newline in the literal now creates a corresponding newline in the resulting string.<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>4. it's easy to get the old behavior back by backslashing the leading newline.<br class=""><br class="">Unfortunately, I think this precludes stripping the trailing newline by default, but I think this is ultimately a simpler and better approach than the previous draft.<br class=""><br class="">Other changes:<br class=""><br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>* We realized we needed to make closing delimiter matching a little more complicated if we wanted to allow one or two adjacent double-quote characters that were part of the literal's contents. Oops.<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>* Tabs aren't actually allowed in ordinary string literals, so we now explicitly mention that as a difference between the two types.<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>* We wrote some tests for the prototype (though they haven't been updated for this new version yet). <br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>* There were some other wording changes, particularly in the indentation stripping rationale, but nothing that affects the actual design.<br class=""><br class="">I understand John is working on a new version of his toolchain so people can play with the prototype. We hope to have that ready for you all soon.<br class=""><br class="">Let us know what you think of the revisions!<br class=""><br class="">-- <br class="">Brent Royal-Gordon<br class="">Architechies<br class=""><br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></div></blockquote></div><br class=""></div></body></html>