[swift-evolution] [Accepted] SE-0168: Multi-Line String Literals

David Hart david at hartbit.com
Sat Apr 22 07:40:38 CDT 2017

> On 22 Apr 2017, at 10:38, Brent Royal-Gordon via swift-evolution <swift-evolution at swift.org> wrote:
>> On Apr 21, 2017, at 11:48 AM, Xiaodi Wu via swift-evolution <swift-evolution at swift.org> wrote:
>> This goes to my question to David Hart. Isn't this an argument for a feature to allow breaking a single-line string literal across multiple lines? What makes this a use case for some feature for _multiline_ string literals in particular?
> Well, if you're breaking a string across several lines, you will want indentation stripping too. Are you suggesting we should also bring that feature to single-line string literals with escaped newlines?

I would say no to keep single-quotes String literals simple and to better distinguish between single and multiline syntaxes. Otherwise, the only difference between the two would be that one allows single and double quotes without escaping.

Therefore, we should try to make triple-quotes String literals support single-line-result strings split over multiple lines of code.

> -- 
> Brent Royal-Gordon
> Architechies
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170422/fc76fcb8/attachment.html>

More information about the swift-evolution mailing list