[swift-evolution] [Review] SE-0168: Multi-Line String Literals
Ricardo Parada
rparada at mac.com
Thu Apr 6 16:18:41 CDT 2017
> On Apr 6, 2017, at 3:35 PM, Joe Groff via swift-evolution <swift-evolution at swift.org> wrote:
>
> Hello Swift community,
>
> The review of SE-0168 "Multi-Line String Literals" begins now and runs through April 12, 2017. The proposal is available here:
>
> https://github.com/apple/swift-evolution/blob/master/proposals/0168-multi-line-string-literals.md <https://github.com/apple/swift-evolution/blob/master/proposals/0168-multi-line-string-literals.md>
>
> • What is your evaluation of the proposal?
+1
> • Is the problem being addressed significant enough to warrant a change to Swift?
As I had said before, it has to be simple and take care of most cases. I wanted a continuation character but some people expressed being able to copy/paste right into the editor without much formatting. And not having a continuation character will make this possible.
I think that using the closing triple quote to control how much indentation to remove from the previous lines is good enough.
String interpolation will be supported and I assume escaping of characters too. So if someone wanted to embed a triple quote then they would have to escape the first one I'm guessing, ie. \""". Although I am not that concerned because triple quotes is super rare in my use cases.
Being able to include quotes without having to escape them is also good as that was one of my main concerns.
> • Does this proposal fit well with the feel and direction of Swift?
I think it does.
> • If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?
Well java uses the concatenation. This would be superior. Other languages use "line 1" then on the next line you start with "line 2", and so on. This would be superior as well because you can copy / paste right into the editor and be productive with minor formatting. It will also allow quotes in the string.
> • How much effort did you put into your review? A glance, a quick reading, or an in-depth study?
>
Participated in the discussion and shared my ideas and goals for this feature.
> More information about the Swift evolution process is available at:
>
> https://github.com/apple/swift-evolution/blob/master/process.md <https://github.com/apple/swift-evolution/blob/master/process.md>
>
> Thank you,
>
> -Joe
> Review Manager
> _______________________________________________
> 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/20170406/90d53f73/attachment.html>
More information about the swift-evolution
mailing list