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

David Beck david at davidbeck.co
Mon Apr 10 18:17:45 CDT 2017


> 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
> 
> Reviews are an important part of the Swift evolution process. All reviews should be sent to the swift-evolution mailing list at:
> 
> https://lists.swift.org/mailman/listinfo/swift-evolution<https://lists.swift.org/mailman/listinfo/swift-evolution>
> 
> or, if you would like to keep your feedback private, directly to the review manager. When replying, please try to keep the proposal link at the top of the message:
> 
> Proposal link:
> 
> https://github.com/apple/swift-evolution/blob/master/proposals/0167-swift-encoders.md
> 
> Reply text
> Other replies
> 
> What goes into a review?
> 
> The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, determine the direction of Swift. When writing your review, here are some questions you might want to answer in your review:
> 
> • What is your evaluation of the proposal?

2 big thumbs up. 👍🏽👍🏽

> • Is the problem being addressed significant enough to warrant a change to Swift?

Yes.

> • Does this proposal fit well with the feel and direction of Swift?

Yes.

> • If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?

Ruby’s multiline string literals are much more flexible (and varied). In theory, being able to provide your own delimiter makes sense (what if I need to type 3 quotes in my multiline string?!?!) but in practice just adds confusion, especially for beginners. Looking at code examples, it’s not obvious where the string literal ends. It also isn’t directly connected to regular string literals either.

ES2015 uses a similar approach as here, using back-ticks instead of triple quotes. That makes sense there, where they also use them for single line pattern strings, but again isn’t directly connected to other string literal syntax.

ObjCs strings have the benefit of controlling indentation much more predictably. If there’s anything I’m concerned about here, it’s that. But I don’t think that’s a high enough priority to sacrifice the other benefits of the proposed syntax. I would be happy to see that syntax added as an additive alternative in a future proposal (something like “line 1”\”line 2”).

> • How much effort did you put into your review? A glance, a quick reading, or an in-depth study?

a quick reading

> 
> More information about the Swift evolution process is available at:
> 
> https://github.com/apple/swift-evolution/blob/master/process.md
> 
> Thank you,
> 
> -Joe
> Review Manager
> 
> 
>  


David Beck
http://davidbeck.co
http://twitter.com/davbeck
http://facebook.com/davbeck

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170410/8c39b0e4/attachment.html>


More information about the swift-evolution mailing list