[swift-evolution] multi-line string literals.
L. Mihalkovic
laurent.mihalkovic at gmail.com
Sat May 7 18:24:09 CDT 2016
Regards
(From mobile)
> On May 8, 2016, at 12:49 AM, Ricardo Parada via swift-evolution <swift-evolution at swift.org> wrote:
>
>
>
> It seems to me like this would take care of what is needed 99% of the time.
>
> I've seen many who don't favor continuation quotes.
>
> The other option could be triple quote """ and make the continuation quote optional. Not using the continuation quote would require the closing triple quote """
>
For having built a prototype, I've come to realize that there are more alternatives.
This is some of my own tests:
https://gist.github.com/lmihalkovic/718d1b8f2ae6f7f6ba2ef8da07b64c1c
The idea of these M/e or any other similar prefix remind me of my perl days (there were a lot of these), and IMO have little to do with the rest of Swift.
>> On May 7, 2016, at 9:48 AM, Brent Royal-Gordon via swift-evolution <swift-evolution at swift.org> wrote:
>>
>> ```
>> // Something like:
>> let xml = M"<?xml version="1.0"?>
>> "<catalog>
>> " <book id="bk101" empty="">
>> " <author>\(author)</author>
>> " </book>
>> "</catalog>
>> ```
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
More information about the swift-evolution
mailing list