<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="font-family:arial,sans-serif">On Fri, Dec 11, 2015 at 12:02 AM, Chris Lattner </span><span dir="ltr" style="font-family:arial,sans-serif"><<a href="mailto:clattner@apple.com" target="_blank">clattner@apple.com</a>></span><span style="font-family:arial,sans-serif"> wrote:</span><br></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div>The reason I raise the question is that some languages have multiple quote styles (Perl 5 has something like 3 or 4 different string literal styles IIRC?) with different policies. One reason for this is to disable processing of escapes: if you’re using string literals to enter something that uses \ or “ frequently, it can be irritating and ugly to have a lot of <a>\\'s</a>. In some dialects of inline assembly in C, for example, this can lead to very ugly code.</div></div></div></blockquote><div><br></div><div><div class="gmail_default" style="font-family:verdana,sans-serif">Since the suggestion is python style multi-line string literals, the only valid terminator would be a triple quote, allowing the use of both " and ' within the literal without having to be escaped (or "" or '', if you're feeling perverse). As for anything else... I hadn't really thought of it. I'd really need more feedback on the mailing list.</div></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div>When introducing a feature like this, I think it would be useful to survey a range of popular languages (and yes, even perl ;-) to understand what facilities they provide and why (i.e. what problems they are solving) and synthesize a good swift design that can solve the same problems with a hopefully simple approach.</div></div></div></blockquote><div><br></div><div><div class="gmail_default" style="font-family:verdana,sans-serif">Perl and Erlang are unique in that valid code in either language looks essentially like line noise. I'd rather take inspiration from languages like ruby, python, and elixir.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Solving a variety of problems and use cases was not my original intention, and will probably involve implementing full heredoc style syntax (or more). If that's where you want the proposal to go, then that's where it will have to go... but for myself, I don't need anything nearly that complex. I only need multi-line string literals that behave the same as existing string literals, only without the noise of "foo\n" + "bar\n" + "baz\n" + etc.</div></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Understood, but our first goal is to get the best solution, independent of implementation complexity. In this case, I suspect that the hard part in this feature is scoping it out and hashing out the right design with the community. I can’t imagine that we’d end up with a design that is that difficult to implement in any case.</div></div></blockquote><div><br></div><div><div class="gmail_default" style="font-family:verdana,sans-serif;display:inline">Fair enough. Lets give the idea some time to ferment and community members time to chime in. ;)</div></div><div><div class="gmail_default" style="font-family:verdana,sans-serif;display:inline"><br></div></div><div><div class="gmail_default" style="font-family:verdana,sans-serif;display:inline">As an aside, I am absolutely loving that Apple is making such an effort to care about its community. This is something that I wouldn't have expected just a few years ago and is amazing in my humblest of opinions. <3</div></div><div><br></div><div><br></div><div><div class="gmail_default" style="font-family:verdana,sans-serif">- Travis Tilley</div><div class="gmail_default" style="font-family:verdana,sans-serif"></div><br></div></div>
</div></div>