[swift-evolution] [Review] SE-0182 - String Newline Escaping

David Hart davidhart at fastmail.com
Fri Jul 14 01:14:10 CDT 2017


> On 14 Jul 2017, at 00:21, Jordan Rose <jordan_rose at apple.com> wrote:
> 
> [Proposal: https://github.com/apple/swift-evolution/blob/master/proposals/0182-newline-escape-in-strings.md <https://github.com/apple/swift-evolution/blob/master/proposals/0182-newline-escape-in-strings.md>]
> 
> This is a tiny, tiny point amidst the broader discussions others are having, but
> 
>> 	• All whitespace characters between \ and the newline are disregarded.
> 
> Why? Why bother allowing whitespace characters between \ and the newline?

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?

David.

> Thanks,
> Jordan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170714/4464651c/attachment.html>


More information about the swift-evolution mailing list