[swift-evolution] [Review] SE-0168: Multi-Line String Literals
brent at architechies.com
Thu Apr 13 07:41:41 CDT 2017
> On Apr 13, 2017, at 5:35 AM, Ricardo Parada via swift-evolution <swift-evolution at swift.org> wrote:
> Take a look at Brent's revised proposal.I personally thin it is perfect. Take a look:
> https://github.com/johnno1962a/swift-evolution/blob/master/proposals/0168-multi-line-string-literals.md <https://github.com/johnno1962a/swift-evolution/blob/master/proposals/0168-multi-line-string-literals.md>
Well, um, looks like we got scooped. (I was playing with some non-essential wording and trying to test all the examples before I pointed the list at the new version.)
Since requiring a leading backslash went over like a lead balloon, we've revised the proposal one more time. The leading newline is now optional: If indentation stripping is enabled, you can either start typing content on the same line as the delimiter, or you can start on the next line. I resisted this solution for a while because it seems ad-hoc, but ultimately it's the design that preserves the most formatting flexibility for the user, so I think it's the right way to go.
Other than that, there are no changes to the design in this revision, though I've rephrased a few things and added a section about why we strip a leading newline but not a trailing one.
John has also built a new version of the toolchain which matches this behavior. Download it here: http://johnholdsworth.com/swift-LOCAL-2017-04-13-a-osx.tar.gz
Thanks for your feedback!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution