<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Dear core team:</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">What syntax would <i>you</i> personally prefer for unescaped strings?</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font face="monospace, monospace">'''<br></font><font face="monospace, monospace"><div class="gmail_default" style="font-family:verdana,sans-serif;display:inline"> </div>this doesn't do anything: <div class="gmail_default" style="font-family:verdana,sans-serif;display:inline">\ </div>\n \t \a<br></font><font face="monospace, monospace"><div class="gmail_default" style="font-family:verdana,sans-serif;display:inline"> </div>moo cow<br></font><font face="monospace, monospace">'''</font></blockquote><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">and:</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font face="monospace, monospace">'\'</font></blockquote><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Or:</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font face="monospace, monospace">r"""<br></font><font face="monospace, monospace"><div class="gmail_default" style="font-family:verdana,sans-serif;display:inline"> </div>this doesn't do anything: <div class="gmail_default" style="font-family:verdana,sans-serif;display:inline">\ </div>\n \t \a<br></font><font face="monospace, monospace"><div class="gmail_default" style="font-family:verdana,sans-serif;display:inline"> </div>moo cow<br></font><font face="monospace, monospace">"""</font></blockquote><div><br></div><div><div class="gmail_default" style="font-family:verdana,sans-serif;display:inline">and:</div></div><div><div class="gmail_default" style="font-family:verdana,sans-serif;display:inline"><br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">r"\"</blockquote> <div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">...perhaps with a capital R. Maybe an RC or RS instead (for raw characters or raw string).</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">The single quote version is more consistent with other languages with this feature (ruby, perl, bourne, other shells). It would also be easier to parse and allow you to define the resulting type after the variable rather than inferring from the literal (which is how I prefer StringLiteralConvertible to work, at least from current experience). You can build some powerful code on top of StringLiteralConvertible and just leaving the string literal <i>alone</i>. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">The r/R/RC/RS prefix versions are consistent-ish sorta kinda-almost with python, and might tie into the existing proposal for literal prefixes/suffixes if that proposal is approved. The details of that would have to be decided in the other thread, but I don't personally see that as an obstacle for implementing the feature of enhanced multi-line and unescaped strings first... even before other typing modifiers are decided upon.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">I prefer single quotes and triple single-quotes, as it feels more natural and familiar for me <i>personally...</i> but either syntax would make me significantly happier than not having one at all, and I haven't internalized "the swift way" quite like the core team has. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">-Travis Tilley</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_extra">
</div></div>