<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="">We have that; it's ".dynamicType". That's not really related to ".self".</div><div class=""><br class=""></div><div class="">Swift's model is like Objective-C's: if you want to refer to a type as a value, you have to call it out specifically. Objective-C chose "[SomeType class]" for this, but "[SomeType self]" actually works as well.</div><div class=""><br class=""></div><div class="">Jordan</div><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 17, 2015, at 4:03 , Taras Zakharko 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="">(Sorry, I pressed the send button accidentally)</span><div class="" 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;"><br class=""></div><div class="" 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;">What I wanted to say is that maybe one can have a more transparent system, e.g. typeOf(x) that always returns type of x? For example, typeOf(3) can be Int, type of typeOf(Int) will be the metatype of Int, etc. Similarly, to refer to a type, one should just be able to use the type name. Does anyone know the reason why the system was set up like it is in the first place?&nbsp;</div><div class="" 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;"><br class=""></div><div class="" 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;">Best,&nbsp;</div><div class="" 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;"><br class=""></div><div class="" 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;">&nbsp;Taras</div><div class="" 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;"><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 17 Dec 2015, at 13:00, Taras Zakharko &lt;<a href="mailto:taras.zakharko@uzh.ch" class="">taras.zakharko@uzh.ch</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class="">I also find this aspect of Swift very confusing. I have worked a lot with metatypes (and metaprogramming in general) in Python and R, but I can’t really wrap my head around how this works in Swift.&nbsp;</div><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 17 Dec 2015, at 11:12, Gwendal Roué 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 class="" 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;">I have two questions:</span><div class="" 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;"><br class=""></div><div class="" 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;">1. why do we need the postfix self?</div><div class="" 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;">2. why is the postfix self sometimes required, and sometimes not? (see sample code below):</div><div class="" 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;"><br class=""></div><div class="" 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;"><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="" style="color: rgb(187, 44, 162);"><span class="Apple-tab-span" style="white-space: pre;">        </span>func</span><span class="Apple-converted-space">&nbsp;</span>f1&lt;T&gt;(type:<span class="Apple-converted-space">&nbsp;</span><span class="" style="color: rgb(112, 61, 170);">T</span>.Type) {<span class="Apple-converted-space">&nbsp;</span><span class="" style="color: rgb(61, 29, 129);">print</span>(type) }</div><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="" style="color: rgb(49, 89, 93);"><span class="Apple-tab-span" style="white-space: pre;">        </span>f1</span>(<span class="" style="color: rgb(112, 61, 170);">Int</span>) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="Apple-converted-space">&nbsp;</span><span class="" style="color: rgb(0, 132, 0);">// Int</span></div><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;"><br class=""></div><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="" style="color: rgb(187, 44, 162);"><span class="Apple-tab-span" style="white-space: pre;">        </span>func</span><span class="Apple-converted-space">&nbsp;</span>f2&lt;T&gt;(type:<span class="Apple-converted-space">&nbsp;</span><span class="" style="color: rgb(112, 61, 170);">T</span>.Type, extra:<span class="Apple-converted-space">&nbsp;</span><span class="" style="color: rgb(112, 61, 170);">Bool</span>) {<span class="Apple-converted-space">&nbsp;</span><span class="" style="color: rgb(61, 29, 129);">print</span>(type) }</div><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="" style="color: rgb(49, 89, 93);"><span class="Apple-tab-span" style="white-space: pre;">        </span>f2</span>(<span class="" style="color: rgb(112, 61, 170);">Int</span>, extra:<span class="Apple-converted-space">&nbsp;</span><span class="" style="color: rgb(187, 44, 162);">true</span>)&nbsp; &nbsp; &nbsp; &nbsp;<span class="Apple-converted-space">&nbsp;</span><span class="" style="color: rgb(0, 132, 0);">// Compiler error</span></div><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="" style="color: rgb(49, 89, 93);"><span class="Apple-tab-span" style="white-space: pre;">        </span>f2</span>(<span class="" style="color: rgb(112, 61, 170);">Int</span>.<span class="" style="color: rgb(187, 44, 162);">self</span>, extra:<span class="Apple-converted-space">&nbsp;</span><span class="" style="color: rgb(187, 44, 162);">true</span>) &nbsp;<span class="Apple-converted-space">&nbsp;</span><span class="" style="color: rgb(0, 132, 0);">// Int</span></div><div class=""><span class="" style="color: rgb(0, 132, 0);"><br class=""></span></div><div class="">Gwendal Roué</div><div class=""><br class=""></div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">Le 15 déc. 2015 à 22:29, Marc Knaup via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; a écrit :</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="" 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;">The word "Type" is also blocked in most cases. So still being able to use the word "type" is less valuable anyway because you cannot create a nested type called "Type" and will most likely rename it to something like "Kind".<div class=""><br class=""></div><div class="">This is actually very annoying:</div><div class=""><br class=""></div><div class=""><div class=""><font face="monospace, monospace" class="">struct Attachment {</font></div><div class=""><font face="monospace, monospace" class=""><br class=""></font></div><div class=""><font face="monospace, monospace" class=""><span class="" style="white-space: pre;">        </span>let type: Type</font></div><div class=""><font face="monospace, monospace" class=""><br class=""></font></div><div class=""><font face="monospace, monospace" class=""><br class=""></font></div><div class=""><font face="monospace, monospace" class=""><span class="" style="white-space: pre;">        </span>enum Type {</font></div><div class=""><font face="monospace, monospace" class=""><span class="" style="white-space: pre;">                </span>case Image</font></div><div class=""><font face="monospace, monospace" class=""><span class="" style="white-space: pre;">                </span>case Video</font></div><div class=""><font face="monospace, monospace" class=""><span class="" style="white-space: pre;">        </span>}</font></div><div class=""><font face="monospace, monospace" class="">}</font></div><div class=""><font face="monospace, monospace" class=""><br class=""></font></div><div class=""><font face="monospace, monospace" class="">let attachmentType = Attachment.Type // error:&nbsp;expected member name or constructor call after type name</font></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></div></div><div class="gmail_extra" 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;"><br class=""><div class="gmail_quote">On Tue, Dec 15, 2015 at 7:24 PM, Jordan Rose via swift-evolution<span class="Apple-converted-space">&nbsp;</span><span dir="ltr" class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt;</span><span class="Apple-converted-space">&nbsp;</span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div class="" style="word-wrap: break-word;"><div class="">".self" was chosen for a few reasons:</div><div class=""><br class=""></div><div class="">- The obvious choice was ".class", given precedent in Objective-C and Java, but not all types are classes.</div><div class="">- 'type' is a very common property name, so we have tried very hard to avoid taking it as a general keyword.</div><div class="">- 'type' also always implies going up a level. "obj.dynamicType" gives you back the type of 'obj', so wouldn't "SomeClass.type" give you back the&nbsp;<a href="http://sealiesoftware.com/blog/archive/2009/04/14/objc_explain_Classes_and_metaclasses.html" target="_blank" class="">metaclass</a>? (Alternately, "SomeType.staticType' not being the same as 'SomeType.dynamicType" seems weird.)</div><div class="">- 'self' is already a keyword.</div><div class="">- ".self" actually works in Objective-C as well.</div><div class="">- ".self" currently also applies to instances, doing exactly what you think it does. This is<span class="Apple-converted-space">&nbsp;</span><i class="">nearly</i>&nbsp;useless. In theory you could use it to unwrap one level of optionality ("doubleOpt?.self") but that doesn't actually work today.</div><div class=""><br class=""></div><div class="">I read "SomeType.self" as "SomeType itself, rather than an instance of it (or associated type)".</div><div class=""><br class=""></div><div class="">(And before someone brings it up, we chose not to just allow "SomeType" on its own because "let x = SomeType" is a likely typo for "let x: SomeType".)</div><div class=""><br class=""></div><div class="">I think coming up with a clearer name is possible here, but there's plenty to consider. Still, certainly a reasonable thing to bring up.</div><div class=""><br class=""></div><div class="">Best,</div><div class="">Jordan</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div class=""><div class="h5"><div class="">On Dec 15, 2015, at 8:42 , Brandon Knope 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></div><div class=""><div class=""><div class="h5"><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">Doh! staticType is the obvious choice!</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">I agree that adding more keywords can be bad, but in this case I think the clarity outweighs any downside:</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">SomeType.staticType</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">SomeType.self&nbsp;</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">To me (and I'm sure many others) one is vastly more obvious and easier to understand.&nbsp;</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">I still don't really understand what SomeType.self is trying to convey upon first glance</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">Brandon&nbsp;</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><br class="">Sent from my iPad</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><br class="">On Dec 15, 2015, at 11:34 AM, Dennis Lysenko &lt;<a href="mailto:dennis.s.lysenko@gmail.com" target="_blank" class="">dennis.s.lysenko@gmail.com</a>&gt; wrote:<br class=""><br class=""></div><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div class=""><div dir="ltr" class="">+1. Side effects can be eliminated through code migration if a suitable property name is chosen. Perhaps `staticType` to continue in the vein of `dynamicType`?&nbsp;<div class=""><br class=""></div><div class="">Main detractor is that creating more keywords isn't necessarily a good thing.</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Tue, Dec 15, 2015 at 11:19 AM Brandon Knope via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div dir="auto" class=""><div class=""><span class=""></span></div><div class=""><span class=""></span>One area of swift that is really not clear to me is when you want to use the type of a class, struct, enum, etc as a value.&nbsp;</div><div class=""><br class=""></div><div class="">Metatyping is explained here:&nbsp;<a href="https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Types.html#//apple_ref/doc/uid/TP40014097-CH31-XID_1022" target="_blank" class="">https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Types.html#//apple_ref/doc/uid/TP40014097-CH31-XID_1022</a></div><div class=""><br class=""></div><div class="">Example:&nbsp;<ol class="" style="border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; line-height: 1.6em; list-style: none;"><li class="" style="text-indent: 0px; border-width: 0px 0px 0px 18px; border-left-style: solid; border-left-color: transparent; margin: 0px; outline: 0px; padding: 0px 10px 0px 0px; vertical-align: baseline; list-style-type: none;"><code class="" style="border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; word-wrap: break-word;"><font face="UICTFontTextStyleTallBody" class=""><span class="" style="background-color: rgba(255, 255, 255, 0); border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">let</span><span class="">&nbsp;</span><span class="" style="background-color: rgba(255, 255, 255, 0); border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">metatype</span><span class="" style="background-color: rgba(255, 255, 255, 0);">:<span class="">&nbsp;</span></span><span class="" style="background-color: rgba(255, 255, 255, 0); border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">SomeClass</span><span class="" style="background-color: rgba(255, 255, 255, 0);">.</span><span class="" style="background-color: rgba(255, 255, 255, 0); border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Type</span><span class="" style="background-color: rgba(255, 255, 255, 0);"><span class="">&nbsp;</span>=&nbsp;SomeClass.</span><span class="" style="background-color: rgba(255, 255, 255, 0); border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">self</span></font></code></li></ol><div class=""><br class=""></div><div class="">Is there a reason why this isn't&nbsp;<span class="" style="background-color: rgba(255, 255, 255, 0);">SomeClass.</span>type? Everywhere in the document this is explained as returning the type yet it's using a postfix self to access the type.&nbsp;</div><div class=""><br class=""></div><div class="">I propose changing the postfix self to something more obvious like "type"</div><div class=""><br class=""></div><div class="">Going back to the example:</div><div class=""><ol class="" style="border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; line-height: 1.6em; list-style: none;"><li class="" style="text-indent: 0px; border-width: 0px 0px 0px 18px; border-left-style: solid; border-left-color: transparent; margin: 0px; outline: 0px; padding: 0px 10px 0px 0px; vertical-align: baseline; list-style-type: none;"><code class="" style="border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; word-wrap: break-word;"><font face="UICTFontTextStyleTallBody" class=""><span class="" style="background-color: rgba(255, 255, 255, 0); border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">let</span><span class="">&nbsp;</span><span class="" style="background-color: rgba(255, 255, 255, 0); border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">metatype</span><span class="" style="background-color: rgba(255, 255, 255, 0);">:&nbsp;SomeClass.</span><span class="" style="background-color: rgba(255, 255, 255, 0); border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Type</span><span class="" style="background-color: rgba(255, 255, 255, 0);"><span class="">&nbsp;</span>=&nbsp;SomeClass.type</span></font></code></li></ol><div class=""><br class=""></div></div><div class="">Several reasons why I think this is better:</div><div class="">1. Postfix self is not obvious as an option as you never see a postfix self anywhere else&nbsp;</div><div class="">2. "self" does not clearly explain that the type is being returned&nbsp;</div><div class="">3. ObjC programmers are familiar with accessing the class type by sending the "class" method to the class type. In this case it needs to work on structs and enums, so a "type" method would make more sense.&nbsp;</div><div class="">4. Instances have a dynamicType method. For consistency, classes, structs, etc., should have a type method</div><div class=""><br class=""></div><div class="">Any other suggestions would be welcome.&nbsp;</div><div class=""><br class=""></div><div class="">Brandon&nbsp;</div><span class=""></span><br class=""><span class="">Sent from my iPad</span><br class=""></div><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=8CZIdLciSFC-2BO5jF-2FiP8qN7dBFsgCUZ50wdTsolcRPcMHsgQz33SrTbIBqh0dxknVxlPrKM0qDNDweGmZL1cMon3PZ86xs9skTnDn9Mn1zx1MxqQrWOqohYw-2BZuIliB4PP8pQkkyelHQxAWhhF1ffVk7-2F-2FYeJOfDcoz-2BBqTCHovFaF7LhZjwOQBBfBVHeCCYOqT6MJXwWRJr17QyAt9KJtBNrY4R0LnkavP7Rf5ghMc-3D" alt="" width="1" height="1" border="0" class="" style="min-height: 1px !important; width: 1px !important; border-width: 0px !important; margin: 0px !important; padding: 0px !important;"></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></blockquote></div></div></blockquote></div></div><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=ZEz4qHYnXhPr3bBPu-2FxP4tN3HfWKL-2FtJpqkQ0gkOVSBU0O-2Fi1NF8tA7GaalX8cmwIU7WEl2pbyDNPPOi-2BYh-2BLE4v-2FpiJY9lSBlsmwJfgoiSOtJiuVJ6kvmGDuq7RId15VtsMr6M4r9fwXYFRLiYqBXoRDm7yAmZjCP-2BZTnlu-2BTPGuSLzXOIW4uEK7ytZYkoJ4zXJ6YNaCCMXpwE72Vx4bCmYJR3ZL3mHSqdrL73w0-2BA-3D" alt="" width="1" height="1" border="0" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; min-height: 1px !important; width: 1px !important; border-width: 0px !important; margin: 0px !important; padding: 0px !important;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; float: none; display: inline !important;"><span class="">&nbsp;</span></span><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; float: none; display: inline !important;">_______________________________________________</span><span class=""><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; float: none; display: inline !important;">swift-evolution mailing list</span><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><a href="mailto:swift-evolution@swift.org" target="_blank" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">swift-evolution@swift.org</a><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span></div></blockquote></div><br class=""><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=6ZGE61OxINd5lLe2xYh9Ku-2BXbixWNr2nvfzp2IB1sZgIq7nubdqvpTFedG4b15cb7zReHZJxNCWroHb-2FFE363A8-2Fvob3xjGYlUVJPhXWR-2Bx-2F7pbtf9-2ByfucUxe43dQQZBaz-2B8y7fsq3E0ByZWDtiwdaKlDLeSevxp7JneNhmtDYNLDNza-2FBlyd-2B3ycU45vLSO6l01Rf5JogWd6hLf7I09YGsqmp-2FUSnLGwJTmK1v6JY-3D" alt="" width="1" height="1" border="0" class="" style="min-height: 1px !important; width: 1px !important; border-width: 0px !important; margin: 0px !important; padding: 0px !important;"></div><br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""><br class=""></blockquote></div><br class=""></div><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=GUvuDT95GpxW2sIYHiKg6obX3uIIobaj9awaKuut6Z-2Fs5GJ-2F-2BVF5oyQBiDmBawUo7QP2O4bM38vw-2FYAQiiISA2p7OGvqM43gIMbCbXuDO5cCcCjNCFUQ5eZOooXGCxVZ9-2Ff5pw4Auau9XY0omgoQJjAGnyyUXcxgoCmEKCE4wDil3vfdOiUzr6mYh-2FP9hPFcwWoyThVAn9VYvqvlDBnprPaFhDYgJZI1bb5Y9ayg2eM-3D" alt="" width="1" height="1" border="0" class="" 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; height: 1px !important; width: 1px !important; border-width: 0px !important; margin: 0px !important; padding: 0px !important;"><span class="" 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;"><span class="Apple-converted-space">&nbsp;</span>_______________________________________________</span><br class="" 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;"><span class="" 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;">swift-evolution mailing list</span><br class="" 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;"><a href="mailto:swift-evolution@swift.org" class="" 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;">swift-evolution@swift.org</a><br class="" 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;"><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="" 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;">https://lists.swift.org/mailman/listinfo/swift-evolution</a></div></blockquote></div><br class=""></div></div><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=x4DBtcYZPuS8wt8fMTVYDXzwU9szxEmdHE1DwQfVzUdibs4P4HHxd56JcOnd-2FhNOVXzE6RWNG0wsRlTZH-2BGxhBJ1dqq1-2FqIySFjo65m6wSOAR2OOrmRBS1DC0Pd1MYAiuexHBKeu4i9MHaH7j5kpGaiwN6ItO6mB-2Bs9yEwdS6pj3plcsC4DBotgYBQaHOgCNcj4CcxJ1fEsimzEb4tmKRKXHwt5dJfmP2iWjSdeVpXQ-3D" alt="" width="1" height="1" border="0" class="" 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; height: 1px !important; width: 1px !important; border-width: 0px !important; margin: 0px !important; padding: 0px !important;"><span class="" 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;"><span class="Apple-converted-space">&nbsp;</span>_______________________________________________</span><br class="" 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;"><span class="" 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;">swift-evolution mailing list</span><br class="" 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;"><a href="mailto:swift-evolution@swift.org" class="" 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;">swift-evolution@swift.org</a><br class="" 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;"><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="" 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;">https://lists.swift.org/mailman/listinfo/swift-evolution</a></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></div><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=ZEz4qHYnXhPr3bBPu-2FxP4tN3HfWKL-2FtJpqkQ0gkOVSDHaAPxwbjbnZPIsJfghvyqOHtvfeOpnbnsezj2L-2FAdyhh-2BxSqozbNk0c7IcYGTyyM-2BVnHJ0mGzXCfwVKkoy5p9kVrppMIjpME2OVZ1kf229yRfE4kBfPl3iY2R158Dy-2BGdwLyINXLu6WvBdyhykOCTaKxGR-2BbXOFUJMtkByzoQkEh-2FIQ7MqcRDW99STcyHG-2Fo-3D" alt="" width="1" height="1" border="0" 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; height: 1px !important; width: 1px !important; border-width: 0px !important; margin: 0px !important; padding: 0px !important;" 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=""><span class="Apple-converted-space">&nbsp;</span></span><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="">_______________________________________________</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=""><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="">swift-evolution mailing list</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=""><a href="mailto:swift-evolution@swift.org" 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="">swift-evolution@swift.org</a><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=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" 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="">https://lists.swift.org/mailman/listinfo/swift-evolution</a></div></blockquote></div><br class=""></body></html>