[Accepted with Revision] SE-0098: Converting dynamicType from a property to an operator

(Chris Lattner) #1

Proposal link: https://github.com/apple/swift-evolution/blob/master/proposals/0096-dynamictype.md

Hello Swift Community,

The review of SE-0098: "Converting dynamicType from a property to an operator" ran from May 24…30, 2016. The proposal is *accepted* for Swift 3.

The feedback on the community on the proposal was very light, but there were significant concerns about its name. After discussion, the core team agrees that “x.dynamicType" should use the syntax of a global function as stated by the proposal, but would prefer for that function to be spelled "type(of: x)” to follow the naming guidelines. The rationale is:

- The function is side-effect free, so it should have a noun that describes what is returned.
- “type” is ambiguously a noun, verb, and perhaps other things, so the “of” preposition is necessary for clarity.

The core team recognizes that this means that we should probably resyntax the existing sizeof/strideof functions, but that should be a follow-on discussion.

Many thanks to Erica Sadun for driving this discussion and writing a great proposal!

-Chris Lattner
Review Manager