<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On 13 Jul 2017, at 23:14, David Hart 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=""><div style="font-family: Helvetica; font-size: 18px; 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=""><blockquote type="cite" class=""><div class=""><br class="Apple-interchange-newline">On 14 Jul 2017, at 00:21, Jordan Rose <<a href="mailto:jordan_rose@apple.com" class="">jordan_rose@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">[Proposal:<span class="Apple-converted-space"> </span><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0182-newline-escape-in-strings.md" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0182-newline-escape-in-strings.md</a>]<div class=""><br class=""></div><div class="">This is a tiny, tiny point amidst the broader discussions others are having, but</div><div class=""><br class=""></div><div class=""><div class=""><blockquote type="cite" class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>• All whitespace characters between \ and the newline are disregarded.</blockquote><br class=""></div><div class="">Why? Why bother allowing whitespace characters between \ and the newline?</div></div></div></div></blockquote><div class=""><br class=""></div><div class="">The reasoning is to be consistent with trailing whitespace in the rest of the code: to leave that to a linter instead. Or to see it differently, even with whitespace between \ and the newline, the programmer’s intent is still clear. Why generate an error?</div></div></div></blockquote><br class=""></div><div>For the same reason that code allows (e.g.) a comment at the end of the line; you wouldn't expect (newline continuation) (comment) to mean the same thing as if generic whitespace were added at the end. The convention in other languages is that \ immediately precedes the line feed to indicate a continuation, not that an orphan \ is valid on its own.</div><div><br class=""></div><div>The reason that \(newline) is valid while \(otherchar)(newline) isn't is because \ immediately precedes another character that it is escaping, and it's possible that \(space) would have a meaning in the future, whereas \(newline) won't.</div><div><br class=""></div><div>Alex</div><br class=""></body></html>