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

Brent Royal-Gordon brent at architechies.com
Wed Apr 12 08:53:16 CDT 2017

> On Apr 12, 2017, at 5:59 AM, Tony Allevato via swift-evolution <swift-evolution at swift.org> wrote:
> I also would oppose comments inside multi-line strings because one place I imagine using it is in Swift code generation and I also want to generate comments, and it seems pointless to have to escape those.

I actually think embedded comments would be super-cool and really useful. We have them for regular expressions in Perl 5 (I actually obliquely referenced the "/x" modifier used to enable them in this proposal) and they're really handy there.

But I think they would need to be an opt-in feature, because you won't usually want them, and I think they would be much more complicated to add than the rest of what we're proposing. (Remember, we need to tell Xcode where our comments are--what will it do if it's told there's a comment in the middle of a string literal?) So I think we're better off leaving that feature for later.

Brent Royal-Gordon

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170412/91b623b8/attachment.html>

More information about the swift-evolution mailing list