<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 Jun 22, 2016, at 4:19 AM, Haravikk via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">The following two lines are equivalent:</div><div class=""><br class=""></div><div class=""><font face="Monaco" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>return "Value of foo is \(foo), have a nice day!"</font></div><div class=""><font face="Monaco" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>return "Value of foo is " + foo + "have a nice day!" // Assuming foo is a String already</font></div><div class=""><br class=""></div><div class="">So in a way you can think of \() as being a means of escaping from the string entirely. I find this more logical than the idea which other languages encourage which is that the variable is somehow embedded inside the string, which is why I actually really like having escape do this in Swift.</div></div></div></blockquote><div><br class=""></div>The two have equivalent output (excluding the omission of “, “ which I assume was a typo), but go through different code paths. I believe the interpolation has more opportunities for memory optimization.</div><div><br class=""></div><div>-DW</div></body></html>