<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 Dec 16, 2015, at 5:24 , Rainer Brockerhoff via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On 12/14/15 20:40, <a href="mailto:swift-evolution-request@swift.org" class="">swift-evolution-request@swift.org</a> wrote:<br class=""><blockquote type="cite" class="">Date: Mon, 14 Dec 2015 12:38:14 -0800<br class="">From: Chris Lattner &lt;<a href="mailto:clattner@apple.com" class="">clattner@apple.com</a>&gt;<br class="">Subject: Re: [swift-evolution] multi-line string literals<br class="">Message-ID: &lt;<a href="mailto:509AEA5D-81C8-48A5-B676-B059624ED4E3@apple.com" class="">509AEA5D-81C8-48A5-B676-B059624ED4E3@apple.com</a>&gt;<br class=""><br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">On Dec 11, 2015, at 4:03 PM, Travis Tilley &lt;<a href="mailto:ttilley@gmail.com" class="">ttilley@gmail.com</a>&gt; wrote:<br class="">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.<br class=""></blockquote></blockquote><br class="">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. &nbsp;I’d be fine ripping it out and repurposing it.<br class=""></blockquote><br class="">IIRC the problems with C character literals began when they began to<br class="">generalize the original concept of representing a single ASCII character.<br class=""><br class="">Repurposing 'x' to something like multiline strings might be confusing<br class="">to people migrating from other languages, but perhaps refocusing on the<br class="">original usage would not be?<br class=""><br class="">IOW, 'x' where x must be a Character, that is, an extended Unicode<br class="">grapheme cluster — represented in the source code as UTF8 or with the \u<br class="">notation. A shortcut for typing Character("x").<br class=""></div></div></blockquote></div><br class=""><div class="">We actually had this at one point, but it turned out that sometimes you wanted a Character and sometimes a UnicodeScalar, and in both cases your algorithm was probably wrong (cf. String is no longer a CollectionType). At that point it didn't offer any benefits over just regular string syntax, and it freed up the syntax for <i class="">something</i>&nbsp;else.</div><div class=""><br class=""></div><div class="">There's a fair amount of precedent for single-quoted strings being:</div><div class="">- single characters (C, Java, C#)</div><div class="">- unprocessed strings (shell scripts, Ruby)</div><div class="">- exactly the same as double-quoted strings (Python)</div><div class=""><br class=""></div><div class="">I (personally) wouldn't want them for multi-line literals, though.</div><div class=""><br class=""></div><div class="">Jordan</div></body></html>