> On Apr 19, 2017, at 3:27 PM, Xiaodi Wu <[email protected]> wrote:
> 
> On Wed, Apr 19, 2017 at 5:24 PM, Joe Groff <[email protected] 
> <mailto:[email protected]>> wrote:
> 
> > On Apr 19, 2017, at 3:16 PM, Xiaodi Wu via swift-evolution 
> > <[email protected] <mailto:[email protected]>> wrote:
> >
> > We had a very full debate about which way was superior during review; it 
> > was proposed to behave one way and the core team decided on the other. We 
> > have to let settled decisions be settled: that's the only way Swift 
> > Evolution will continue to work.
> 
> I'm asking the core team for clarification on the point of the closing 
> newline.
> 
> Cool, thanks. Please do remind them, though, that not stripping the closing 
> newline (which is what was originally proposed) *and* not having the option 
> of using `\` to elide newlines (which is contrary to what was originally 
> proposed) would mean that all multi-line strings would mandatorily end in a 
> newline.

To clarify, the core team's decision is that one trailing newline should be 
elided before the closing delimiter. This maintains one consistent rule for 
both ends of the literal, so """\n and \n""" can be mentally understood as 
balanced delimiters. as Xiaodi noted, it would otherwise be impossible to write 
a literal without a trailing newline without scope-creeping the design with 
additional features.

-Joe
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to