<div dir="ltr">On Wed, Apr 19, 2017 at 5:09 PM, Joe Groff <span dir="ltr">&lt;<a href="mailto:jgroff@apple.com" target="_blank">jgroff@apple.com</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span class=""><blockquote type="cite"><div>On Apr 19, 2017, at 3:07 PM, Xiaodi Wu &lt;<a href="mailto:xiaodi.wu@gmail.com" target="_blank">xiaodi.wu@gmail.com</a>&gt; wrote:</div><br class="m_1805015008236416889Apple-interchange-newline"><div><div>Hmm, I don&#39;t know that I agree. What&#39;s the harm of trailing spaces, and if a warning, how would I silence it given that \ is rejected as a way to suppress a literal newline?</div></div></blockquote><div><br></div></span><div>\(&quot;&quot;) comes to mind, if nothing else.</div></div></div></blockquote><div><br></div><div>Good point.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div>Other common tools like Git already flag trailing whitespace by default, so even if Swift doesn&#39;t warn about it, you might still need to satisfy other tools in your pipeline.</div></div></div></blockquote><div><br></div><div>Isn&#39;t that an equally good argument for Swift *not* warning you about it? If it&#39;s harmful, you&#39;ll have other tools in the pipeline to flag it for you.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-Joe</div></font></span><span class=""><br><blockquote type="cite"><div><div><br><div class="gmail_quote"><div>On Wed, Apr 19, 2017 at 17:02 Joe Groff via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><blockquote type="cite"><div>On Apr 19, 2017, at 2:43 PM, Adrian Zubarev &lt;<a href="mailto:adrian.zubarev@devandartist.com" target="_blank">adrian.zubarev@devandartist.<wbr>com</a>&gt; wrote:</div><br class="m_1805015008236416889m_8602596960290602065Apple-interchange-newline"><div><div class="m_1805015008236416889m_8602596960290602065bloop_markdown" style="font-family:Helvetica,Arial;font-size:13px;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;background-color:rgb(254,254,254)"><p style="margin:15px 0px">First of all, thank you for accepting the proposal. However I still have one single concern left about the trailing whitespaces. Will the final implemented version raise a warning or produce an error when there are trailing whitespaces?</p><p style="margin:15px 0px">The whole idea of a trailing<span class="m_1805015008236416889m_8602596960290602065Apple-converted-space"> </span><code style="font-family:Menlo,Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:10pt;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:rgb(248,248,248);color:inherit;border:1px solid rgb(234,234,234);margin:0px 2px;padding:0px 5px;word-break:normal;word-wrap:normal">\</code><span class="m_1805015008236416889m_8602596960290602065Apple-converted-space"> </span>was in first place to prevent new line injection but also for trailing whitespace character precision.</p><p style="margin:15px 0px">The following example could have 1000 characters, but a different developer who reads the code wouldn’t even notice.</p><pre style="margin:15px 0px;font-family:Menlo,Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:10pt;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:rgb(248,248,248);color:inherit;border:1px solid rgb(204,204,204);overflow:auto;padding:4px 8px;word-break:normal;word-wrap:normal"><code class="m_1805015008236416889m_8602596960290602065swift" style="font-family:Menlo,Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:10pt;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:rgb(248,248,248);color:inherit;border:0px;margin:0px;padding:0px;word-break:normal;word-wrap:normal">&quot;&quot;&quot;
Foo&lt;space&gt;&lt;space&gt;…&lt;space&gt;
Bar
&quot;&quot;&quot;
</code></pre><p style="margin:15px 0px">That’s what the trailing backslash was meant for. To prevent unwanted whitespaces, or if you really need them, to force you to be precise about them.</p><pre style="margin:15px 0px;font-family:Menlo,Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:10pt;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:rgb(248,248,248);color:inherit;border:1px solid rgb(204,204,204);overflow:auto;padding:4px 8px;word-break:normal;word-wrap:normal"><code class="m_1805015008236416889m_8602596960290602065swift" style="font-family:Menlo,Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:10pt;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:rgb(248,248,248);color:inherit;border:0px;margin:0px;padding:0px;word-break:normal;word-wrap:normal">&quot;&quot;&quot;
Foo&lt;space&gt;&lt;space&gt;&lt;space&gt;\n\
Bar
&quot;&quot;&quot;
</code></pre></div></div></blockquote></div></div><div style="word-wrap:break-word"><div>That seems like a reasonable thing to warn about. That also reminds me, blank lines should be accepted within a literal even if they aren&#39;t &quot;indented&quot; with invisible whitespace.</div></div><div style="word-wrap:break-word"><div><br></div><div>-Joe</div><br></div>______________________________<wbr>_________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-<wbr>evolution</a><br>
</blockquote></div></div>
</div></blockquote></span></div><br></div></blockquote></div><br></div></div>