<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 11, 2015, at 8:01 AM, Travis Tilley <<a href="mailto:ttilley@gmail.com" class="">ttilley@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_default" style="font-family:verdana,sans-serif">OK, I understand your problem better with that example. Perhaps a solution would be to have """ process escapes while ''' starts a "raw" string. This is very much in line with ruby's style of strings where processing isn't done within single quoted strings:</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br class=""></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px" class=""><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace" class="">irb(main):001:0> foo = 2</font></div></div><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace" class="">=> 2</font></div></div><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace" class="">irb(main):002:0> "#{foo}"</font></div></div><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace" class="">=> "2"</font></div></div><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace" class="">irb(main):003:0> '#{foo}'</font></div></div><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace" class="">=> "\#{foo}"</font></div></div></blockquote><div class="gmail_default" style="font-family:verdana,sans-serif"><br class=""></div><div class="gmail_default" style="font-family:verdana,sans-serif">(Ignore that \# at the end there; that's only because the interactive console returns a double quoted string. I assure you, the contents are unescaped.)</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br class=""></div><div class="gmail_default" style="font-family:verdana,sans-serif">If we go with this syntax for escaped and unescaped strings, then for consistency's sake it would make sense to have single-line single-quoted strings that don't escape and are "raw" strings like in ruby.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br class=""></div><div class="gmail_default" style="font-family:verdana,sans-serif">CCing Chris Lattner here specifically because, in swift today, using single quotes gives you a warning to just use double quotes, so he might have a strong opinion on this one. The latest commit to Lexer.cpp was actually to add better handling of single quoted strings (and I think more warnings if I remember?).<br class=""></div></div></div></blockquote><br class=""></div><div>I’m ok with repurposing single quoted strings for something else. Making them be the canonical “do not process escapes” string would make sense to me. They should be usable in both single line and multi-line forms.</div><div><br class=""></div><div>-Chris</div><br class=""></body></html>