[swift-evolution] multi-line string literals

David Waite david at alkaline-solutions.com
Thu Dec 17 02:41:26 CST 2015

> On Dec 16, 2015, at 6:24 AM, Rainer Brockerhoff via swift-evolution <swift-evolution at swift.org> wrote:
> On 12/14/15 20:40, swift-evolution-request at swift.org wrote:
>> Date: Mon, 14 Dec 2015 12:38:14 -0800
>> From: Chris Lattner <clattner at apple.com>
>> Subject: Re: [swift-evolution] multi-line string literals
>> Message-ID: <509AEA5D-81C8-48A5-B676-B059624ED4E3 at apple.com>
>>>> On Dec 11, 2015, at 4:03 PM, Travis Tilley <ttilley at gmail.com> wrote:
>>>> Fair enough. Plus if Chris Lattner has any strong opinions about the behavior of single quotes, which might be the case given the existing code for handling them in Lexer.cpp, backticks are a damn good alternative. I'd still like to wait to hear back from him or someone else on the core team about that one.
>> Support for single quoted literals like 'x' was a legacy feature for C-like character literals that we explored before the design of Character went to where it is now.  I’d be fine ripping it out and repurposing it.
> IIRC the problems with C character literals began when they began to
> generalize the original concept of representing a single ASCII character.
> Repurposing 'x' to something like multiline strings might be confusing
> to people migrating from other languages, but perhaps refocusing on the
> original usage would not be?
> IOW, 'x' where x must be a Character, that is, an extended Unicode
> grapheme cluster — represented in the source code as UTF8 or with the \u
> notation. A shortcut for typing Character("x”).

let c:Character = “c” works fine today, as it implements ExtendedGraphemeClusterLiteralConvertible. 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151217/0e39d7c4/attachment.html>

More information about the swift-evolution mailing list