I like the continuation quote. It makes the code stay pretty. It doesn't break
the indentation of your code. If you take out the continuation quote then
things look out of place, as if someone pasted text in the middle of your code
by mistake. I don't like the heredoc notation either for the same reasons.
I envision being able to type the opening multi line quote, i.e. M" and then
pasting multi line text from the clipboard. The editor would do a smart paste
prepending the lines of text with the continuation character.
Let's keep our code looking pretty and focus on the main things:
1. Allow interpolation
2. Remove the need to add the \n character for each line
3. Remove the need to escape the double quote and apostrophe
4. Keep it simple
I would be fine just with this:
let xml = M"<?xml version="1.0"?>
"<catalog>
" <book id="bk101" empty="">
" <author>\(author)</author>
" </book>
"</catalog>
> On May 5, 2016, at 9:17 AM, David Hart via swift-evolution
> <[email protected]> wrote:
>
>
>> On 05 May 2016, at 12:30, Michael Peternell via swift-evolution
>> <[email protected] <mailto:[email protected]>> wrote:
>>
>> it's not a secret that I'm not a big fan of the proposal. The third draft
>> doesn't change this and it's unlikely that any future draft will, because
>> for me, the problem are the continuation quotes, and for Brent it seems like
>> they are a must-have-feature (correct me if I'm wrong.)
>
> I agree with all you said. I’m fairly sure I would never vote for Brent’s
> proposal simply because of the existence of continuation quotes, no matter
> the amount of reasoning behind it. They are simply too unwieldy, cumbersome
> and unfriendly to modification.
>
> I could see either your proposal, or your proposal without the HERE_DOCs but
> using Tyler’s/Scala’s .stripMargin. Do you think you could start a formal
> proposal?
> _______________________________________________
> swift-evolution mailing list
> [email protected]
> https://lists.swift.org/mailman/listinfo/swift-evolution
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution