<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=""><div class="">Ummm … isn’t that _exactly_ what backticks are for? From the docs:</div><div class=""><br class=""></div><div class=""><span style="color: rgb(65, 65, 65); font-family: Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);" class="">&nbsp; &nbsp; To use a reserved word as an identifier, put a backtick (</span><code class="code-voice" style="border: 0px; font-size: 0.85em; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(128, 128, 128); font-family: Menlo, monospace; word-wrap: break-word;">`</code><span style="color: rgb(65, 65, 65); font-family: Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);" class="">) before and after it.</span></div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 5, 2016, at 10:42 PM, Greg Parker via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I think it is a bug &nbsp;:-) &nbsp;That's not what backquotes are for. It ought to be either supported without the backquotes or banned regardless of backquotes.&nbsp;</div><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jan 5, 2016, at 8:34 PM, Jacob Bandes-Storch &lt;<a href="mailto:jtbandes@gmail.com" class="">jtbandes@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Yes, it seems to use the strong shadowing variable. (The compiler doesn't complain about "self.foo", and "self?.foo" becomes invalid because self is no longer optional.)<div class=""><br class=""></div><div class="">If it weren't so useful, I'd call it a bug.<br class=""><div class="gmail_extra">
<br class=""><div class="gmail_quote">On Tue, Jan 5, 2016 at 8:34 PM, Greg Parker <span dir="ltr" class="">&lt;<a href="mailto:gparker@apple.com" target="_blank" class="">gparker@apple.com</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class="">Does further use of self after that actually use a strong shadowing variable? Or does it go back to the weak reference it already had as if the shadow were not there?</div><span class=""><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div class="">On Jan 5, 2016, at 8:26 PM, Jacob Bandes-Storch via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class=""><div class=""><div dir="ltr" class="">Wow! I didn't know that worked. It's a bit surprising, and perhaps not intended. I think the proposal is still valid.<div class="gmail_extra"><br class=""><div class="gmail_quote">On Tue, Jan 5, 2016 at 8:21 PM, Christopher Rogers <span dir="ltr" class="">&lt;<a href="mailto:christorogers@gmail.com" target="_blank" class="">christorogers@gmail.com</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You can shadow self with a guard like you wrote it if use the keyword escaping backquotes like so:<br class=""><br class="">guard let `self` = self else { return }</blockquote></div></div></div></div></blockquote></div></span></div></blockquote></div></div></div></div></div></blockquote></div><br class="">
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=zCg-2FSGF9Wk188a6c55kLyEbrj7YhaXxFEHM-2F-2B0YAlzVd6mytc-2Bot4Nm0jCNAgoJQ9HD-2FdukApss0YvDHJVDga5JqX24xJKIBtSZZPdEpFRoxNQNHIojDDiWTjpRnu1FoNIrWUaH-2FfgGg4R-2BxhI1xHLGfmei8pcxFhZjUQ3tfKNrJDTLFWYVsIcJw8NTo-2B3Ktg4QOrmww9PmlDmkGobNutJFnEnBs3pBkJ0W9j9TJWms-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" class="">
</div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>