<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Are there reasons that prevent using `Self` as a synonym for an instance's type name?<div class=""><br class=""></div><div class="">Consider:<br class=""><div class=""><div class=""><div class=""><br class=""></div><div class=""><div class=""><font face="Menlo" class="">struct MyStruct {</font></div><div class=""><font face="Menlo" class="">&nbsp; &nbsp; static func foo() { print("foo") }</font></div><div class=""><font face="Menlo" class="">&nbsp; &nbsp; func bar() {</font></div><div class=""><font face="Menlo" class="">&nbsp; &nbsp; &nbsp; &nbsp; MyStruct.foo() // works</font></div><div class=""><font face="Menlo" class="">&nbsp; &nbsp; &nbsp; &nbsp; self.dynamicType.foo() // works</font></div><div class=""><font face="Menlo" class="">&nbsp; &nbsp; &nbsp; &nbsp; Self.foo() // error</font></div><div class=""><font face="Menlo" class="">&nbsp; &nbsp; }</font></div><div class=""><font face="Menlo" class="">}</font></div></div></div><div class=""><br class=""></div><div class="">Obviously, you can always name a type directly or use `self.dynamicType` but</div><div class="">neither solution does any favors for readability. Both approaches obscure intent,&nbsp;</div><div class="">especially as type names grow large: `MyExtremelyLargeTypeName.staticMember`,</div><div class="">for example. Plus, as Kevin B pointed out to me, &nbsp;`self.dynamicType.classMember` &nbsp;</div><div class="">and `TypeName.classMember` may not be synonyms in class types with non-final members.</div><div class=""><br class=""></div><div class=""><div class="">I'd like to see `Self.staticMember` introduced as a synonym for `TypeName.staticMember`.</div></div><div class=""><br class=""></div><div class="">Thoughts?</div><div class=""><br class=""></div><div class="">-- E</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></div></div></body></html>