on Wed Apr 06 2016, Brent Royal-Gordon <swift-evolution@swift.org> wrote:
>> Alternatively, why is it ‘dynamicType’ and not just ‘type’? > > I suspect this has something to do with the 27 methods in various OS X > frameworks named `type`. (To be fair, 17 of those are in WebKit's DOM > classes.) Really, no. It's because something's static type is a useful distinction from its dynamic type, and this clarifies which one you're getting. > What I'm less sure about is why it's not a free function > instead. Other than the `dynamicType` and `self` pseudo-properties, > I'm not aware of any members which are present on all types. We might > be better off making `dynamicType` a free `typeof(_:)` function (or > should it be `type(of:)`? are `sizeof` and friends changing?) and > `self` a free `identity(_:)` function; these would make them > non-magical parts of the language, which would be kind of neat. -- Dave _______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution