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?

The whole idea of a trailing \ was in first place to prevent new line injection 
but also for trailing whitespace character precision.

The following example could have 1000 characters, but a different developer who 
reads the code wouldn’t even notice.

"""
Foo<space><space>…<space>
Bar
"""
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.

"""
Foo<space><space><space>\n\
Bar
"""


-- 
Adrian Zubarev
Sent with Airmail

Am 19. April 2017 um 22:03:31, Joe Groff via swift-evolution 
([email protected]) schrieb:

- It should be clarified that multiline strings support the same escapes and 
interpolations as single-line strings. This allows a literal """ to be written 
\""". Discussion on the list raised the idea of allowing a line to end with \ 
to "escape" the newline and elide it from the value of the literal; the core 
team had concerns about only allowing that inside multi-line literals and felt 
that that could also be considered later as an additive feature.
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to