<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 class="">Finally.. a <a href="http://johnholdsworth.com/swift-LOCAL-2017-04-12-a-osx.tar.gz" class="">new Xcode toolchain</a> is available largely in sync with the proposal as is.</div><div class="">(You need to restart Xcode after selecting the toolchain to restart SourceKit)</div><div class=""><br class=""></div><div class="">I personally am undecided whether to remove the first line if it is empty. The new</div><div class="">rules are more consistent but somehow less practical. A blank initial line is almost</div><div class="">never what a user would want and I would tend towards removing it automatically.</div><div class="">This is almost what a user would it expect it to do.</div><div class=""><br class=""></div><div class="">I’m less sure the same applies to the trailing newline. If this is a syntax for</div><div class="">multi-line strings, I'd argue that they should normally be complete lines -</div><div class="">particularly since the final newline can so easily be escaped.</div><div class=""><br class=""></div><div class=""><span style="font-family: Menlo; font-size: 11px; font-variant-ligatures: no-common-ligatures;" class=""> </span><span style="font-family: Menlo; font-size: 11px; font-variant-ligatures: no-common-ligatures; color: rgb(186, 45, 162);" class="">let</span><span style="font-family: Menlo; font-size: 11px; font-variant-ligatures: no-common-ligatures;" class=""> longstring = ""</span><span style="font-family: Menlo; font-size: 11px; font-variant-ligatures: no-common-ligatures; color: rgb(209, 47, 27);" class="">"\</span></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod \</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, \</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> "</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">""</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #3e1e81" class="">print</span><span style="font-variant-ligatures: no-common-ligatures" class="">( ""</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"\</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> Usage: myapp <options></span></div><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27); min-height: 13px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> Run myapp to do mything</span></div><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27); min-height: 13px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> Options:</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> -myoption - an option</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> "</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">"" )</span></div></div><div class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><br class=""></span></div><div class="">(An explicit “\n" in the string should never be stripped btw)</div><div class=""><br class=""></div><div class="">Can we have a straw poll for the three alternatives:</div><div class=""><br class=""></div><div class="">1) Proposal as it stands - no magic removal of leading/training blank lines.</div><div class="">2) Removal of a leading blank line when indent stripping is being applied.</div><div class="">3) Removal of leading blank line and trailing newline when indent stripping is being applied.</div><div class=""><br class=""></div><div class="">My vote is for the pragmatic path: 2)</div><div class=""><br class=""></div><div class="">(The main intent of this revision was actually removing the link between how the</div><div class="">string started and whether indent stripping was applied which was unnecessary.)</div><br class=""><div><blockquote type="cite" class=""><div class="">On 12 Apr 2017, at 17:48, Xiaodi Wu via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Agree. I prefer the new rules over the old, but considering common use cases, stripping the leading and trailing newline makes for a more pleasant experience than not stripping either of them.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">I think that is generally worth prioritizing over a simpler algorithm or even accommodating more styles. Moreover, a user who wants a trailing or leading newline merely types an extra one if there is newline stripping, so no use cases are made difficult, only a very common one is made more ergonomic.</span></div></blockquote></div><br class=""></body></html>