<div dir="ltr">On Thu, Nov 23, 2017 at 1:12 PM, Brent Royal-Gordon via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br><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 dir="auto"><span><div><font color="#000000"><span style="background-color:rgba(255,255,255,0)">On Nov 23, 2017, at 11:15 AM, Chris Lattner via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br><br></span></font></div><blockquote type="cite"><font color="#000000"><span style="background-color:rgba(255,255,255,0)">Until we figure out that path forward for regex’s, I think they aren’t the right motivation for this proposal.</span></font></blockquote><div><br></div></span><div>1. Even in our shining pattern matching future—a future which I, for one, am eager to hasten—we will still need to interoperate with NSRegularExpression and other Perl 5-compatible regex engines.</div></div></blockquote><div><br></div><div>Can you explain why such interoperability would need _raw string literals_ as opposed to regex literals?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div></div><div>2. Code generation.</div></div></blockquote><div><br></div><div>Can you elaborate on this?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div></div><div>3. Windows-style paths. </div></div></blockquote><div><br></div><div>Sure, Windows-style paths use the backslash. But it&#39;s not a useful exercise to enumerate all places where backslashes are used, but rather where they&#39;re often used in _literals_. How often are you hardcoding Windows-style paths? Wouldn&#39;t an ergonomic API accept the forward slash also? Even many Microsoft-vended Windows utilities do so.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div></div><div>4. Doesn’t LaTeX use backslashes?</div></div></blockquote><div><br></div><div>Again, not often you&#39;re hardcoding LaTeX literals. Let&#39;s not turn this into an exercise in listing all places where you&#39;ve seen a backslash used.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>5. Etc. </div><div><br></div><div>I think the Motivation section undersells this proposal. Regexes are a strong short-run use case, but in the long run, we’ll need this for other things. In both cases, though, raw literals will be a useful addition to the language, improving the clarity of Swift code much like multiline literals already have.  </div></div></blockquote></div><br></div></div>