<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 16 May 2017, at 16:20, Gwendal Roué via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I <br class=""><div class=""><blockquote type="cite" class=""><div class="">Le 16 mai 2017 à 15:39, Adrian Zubarev <<a href="mailto:adrian.zubarev@devandartist.com" class="">adrian.zubarev@devandartist.com</a>> a écrit :</div><br class="Apple-interchange-newline"><div class=""><div class="bloop_markdown" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(254, 254, 254);"><p style="margin: 15px 0px; -webkit-margin-before: 0px;" class="">Well the main complain I had during the discussion with David was, that I previously had such a model in mind which will break up long double-quoted string literals. Please look up this design in the alternative section of our proposal. By adding slightly redundant multi-line string literal syntax for consistency renders that complain to zero. By allowing:</p><pre style="margin: 15px 0px; font-family: Menlo, Consolas, 'Liberation Mono', Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(248, 248, 248); color: inherit; border: 1px solid rgb(204, 204, 204); overflow: auto; padding: 4px 8px; word-break: normal; word-wrap: normal;" class=""><code style="font-family: Menlo, Consolas, 'Liberation Mono', Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(248, 248, 248); color: inherit; border: 0px; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal; -webkit-margin-before: 0px;" class="">"
SELECT 'name'
FROM 'people'
WHERE age > 20
"
</code></pre><p style="margin: 15px 0px;" class="">it becomes clear that the trailing backslash should only be used for escaping new line injection in multi-line string literals, but not for breaking up long strings (similar to other languages like JavaScript):</p><pre style="margin: 15px 0px; font-family: Menlo, Consolas, 'Liberation Mono', Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(248, 248, 248); color: inherit; border: 1px solid rgb(204, 204, 204); overflow: auto; padding: 4px 8px; word-break: normal; word-wrap: normal;" class=""><code style="font-family: Menlo, Consolas, 'Liberation Mono', Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(248, 248, 248); color: inherit; border: 0px; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal; -webkit-margin-before: 0px;" class="">"SELECT 'name' \
FROM 'people' \
WHERE age > 20"
</code></pre><p style="margin: 15px 0px;" class="">This also lets us adopt the C/Objective-C syntax instead.<span class="Apple-converted-space"> </span></p><pre style="margin: 15px 0px; font-family: Menlo, Consolas, 'Liberation Mono', Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(248, 248, 248); color: inherit; border: 1px solid rgb(204, 204, 204); overflow: auto; padding: 4px 8px; word-break: normal; word-wrap: normal;" class=""><code style="font-family: Menlo, Consolas, 'Liberation Mono', Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(248, 248, 248); color: inherit; border: 0px; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal; -webkit-margin-before: 0px;" class="">"SELECT 'name' "
"FROM 'people' "
"WHERE age > 20"
</code></pre></div></div></blockquote><div class=""><br class=""></div><div class=""><div class="">SE-0168 had one focus: long literals that contain newline characters. And it does a great job addressing it.</div><div class=""><br class=""></div><div class="">SE-0168 does not talk about hard wrapping. Make this the only focus of your proposal. Simplify your motivation section. Strip away redundant solutions. Become expert in hard wrapping, and please give us one correct solution. Don't forget to talk about trailing/leading newlines and text editor grammars, because those were two important discussion topics for SE-0168.</div></div></div></div></div></blockquote><div><br class=""></div><div>I’m okay with that goal. But I’m not convinced that trailing backslash in multi-line strings alone can solve hard-wrapping. Again, compare the two examples (already mentioned in previous email):</div><div><br class=""></div><div><font face="Menlo" class="">assert(condition, “””<br class=""> This is my message but after some point I need to go to the next line \<br class=""> and I need to escape newlines on every line.<br class=""> “””)</font></div><div><br class=""></div><div>VS</div><div><br class=""><font face="Menlo" class="">assert(condition, “This is my message but after some point I need to go "<br class=""> "to the next line and I need to escape newlines on every line.")</font></div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><div class=""><div class="">Gwendal</div><div class=""><br class=""></div></div></div></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>