<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 Apr 5, 2016, at 3:04 PM, Joe Groff 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=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">What you're describing should be spelled `Self`, IMO. I think Tim intended `#Self` to mean the *static* type the code is declared inside (which is the same as Self unless you're in a class).</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></blockquote><div><br class=""></div>Yes, that is what I was aiming for. `#Self` would be a pretty much textual replacement just like #file, etc. That is, I could imaging it being used in a bunch of cases (not useful here, but just intending to enumerate the possible uses I see):</div><div><br class=""></div><div>class Foo {</div><div><span class="Apple-tab-span" style="white-space: pre;">        </span>static let myClass: #Self.Type = #Self.self</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>static let anInstance: #Self = #Self()</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>static let defaultState = …</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space: pre;">        </span>var&nbsp;state = #Self.defaultState<span class="Apple-tab-span" style="white-space: pre;">        </span></div><div>}</div><div><br class=""></div><div>The extra bit I was suggesting for allowing passing it in as a default argument like #file is for assert/precondition would be useful to me too:</div><div><br class=""></div><div>func globalFunc&lt;SomeType: SomeProtocol&gt;(callerType: SomeType.Type = #Self.self, …)</div><div><br class=""></div><div>which would only be callable inside a class/struct/enum context that conformed to SomeProtocol (unless you explicitly passed a callerType that met the requirements, of course). I’ve no idea if this latter bit is hard enough or controversial enough to be its own proposal =)</div><div><br class=""></div><div>-tim</div><div><br class=""></div></body></html>