As you must know by now, WWDC 2016 has been announced! What’s most surprising and exciting to me is the emphasis on Swift — it’s all over the WWDC pages on Apple’s site. I certainly did not expect this strong of a focus on Swift. Usually there are teasers about the upcoming OS and hardware releases. Of course, it’s no surprise that Swift 3.0 is coming so it makes me wonder, what else is planned for Swift that we don’t know about?

In other news, the Xcode 7.3.1 GM seed was released. It includes a bunch of bug fixes and Swift 2.2.1. However, the release notes didn’t specify the Swift version and the version number did not get bumped in Xcode. But don’t worry, the fixes are in there. 😄

Starter tasks

  • SR-1266: Remove duplication between swift/test and swift/validation-test configuration files. This is a good introduction to the Swift build system, its test suite, and CMake.
  • SR-1263: Compiler wrongfully complains of illegal syntax when declaring multiple conformances for a protocol’s associated type.
  • SR-1238: UnsafePointer and UnsafeMutablePointer should conform to Comparable

Submit a task by sending a pull request or a tweet.

Commits and pull requests

Anna Zaks merged some fixes and improvements to the swift_demangle API. 🤓

Alex Hoppen submitted a pull request that implements SE-0036: Requiring Leading Dot Prefixes for enum Instance Member Implementations. (SR-1236). 👍

Brian Gesiak opened a pull request to begin adding testing support for Android.

Max Howell merged changes that add a flag to make the build output location of SwiftPM configurable.

Daniel Eggert’s implementation of NSHTTPURLResponse has merged. 🎉

Brian Gesiak opened a pull request to expand the Linux/FreeBSD check to include Android. It’s so weird to see #if os(Android). 😄

Joe Groff merged changes that allow Objective-C generic extensions to perform @objc operations involving generics. “This should allow an extension to use the generic class’s own API to some degree, as it would if defined on the non-generic form.”

John Holdsworth submitted a pull request with an implementation of a swift-format tool to indent swift source code from the command line using the new libIDE API (SR-146). 👏 Unfortunately, it looks like it was closed due to some git rebasing problems. 😅 It looks like John will open a fresh pull request soon.

Ted Kremenek opened a pull request that implements SE-0039: Modernizing Playground Literals. 😎

Mauricio Meirelles submitted a pull request that begins implementing NSMassFormatter.

There were a ton of changes merged to corelibs-foundation to update the APIs for the Great API Transformation. It’s happening.

  • Robert F. Dickerson updated NSDate, NSTimeZone, and NSDateFormatter.
  • Pushkar N Kulkarni updated NSCache and updated NSHTTPCookie.
  • @saiHemak updated NSCalendar.
  • Bhaktavatsal Reddy updated NSData.

Accepted proposals

It was a big week for proposals! 🎉

Doug Gregor’s proposal, SE-0057: Importing Objective-C Lightweight Generics, was accepted for Swift 3.

This proposal only received light commentary from the community, but that feedback was universally positive. The core team agrees that this is will greatly improve the expressivity of imported Objective-C APIs into Swift. The implementation work is quite far along, and while there are still a couple engineering-level questions left, the design is solid, so we are comfortable accepting it at this point.

Chris Lattner’s proposal, SE-0048: Generic Type Aliases, was accepted for Swift 3. “The proposal received overwhelmingly positive feedback and has now been implemented for Swift 3.” 😧

Chris Lattner’s proposal, SE-0049: Move @noescape and @autoclosure to be type attributes, has been accepted for Swift 3. “Feedback on the proposal was light but positive.” The work for this was tracked at SR-1235 and it looks like Chris has finished most of the work. 👏

Erica Sadun’s and Chris Lattner’s proposal, SE-0036: Requiring Leading Dot Prefixes for enum Instance Member Implementations, has been accepted for Swift 3. “We welcome an implementation of this proposal.” As mentioned above, Alex Hoppen already submitted a pull request for this. 🎉

David Hart’s proposal, SE-0062: Referencing Objective-C key-paths, has been accepted for Swift 3. This work is being tracked at SR-1237.

The proposal is accepted, with one adjustment to the handling of collections: rather than support any SequenceType as a collection, the core team wants a narrower rule for only the primary Cocoa collection types (NSArray, NSDictionary, NSSet) and their Swift-bridged equivalents (Array, Dictionary, Set), due to implementation concerns. Feedback on this proposal was generally positive, and the proposal fits well with #selector (SE-0022).

David Hart’s proposal, SE-0064: Referencing the Objective-C selector of property getters and setters, has been accepted for Swift 3. “Feedback was light but positive, with many considering this to effectively be an obviously missing piece of the #selector proposal SE-0022.” Work is being tracked at SR-1239. Alex Hoppen is working on an implementation.

Max Howell’s proposal, SE-0063: SwiftPM System Module Search Paths, has been accepted for Swift 3. “Feedback was light but positive, which was not surprising since there had been email discussions of this topic for some time and there was general agreement about the need.”

Dave Abrahams’ proposal, SE-0059: Update API Naming Guidelines and Rewrite Set APIs Accordingly, has been accepted for Swift 3.

There was much debate, both before and during the review, over the “InPlace” suffix / “form” prefix, and at this point any answer will be objectionable to some. The core team has opted to accept the proposal as-is, keeping the “form” prefix to describe the mutating counterpart to an operation naturally described by a noun (e.g., “formUnion” for the mutating variant of “union”), for the reasons described in the proposal itself. Thanks all for the spirited discussion!

Rejected Proposals

Proposal SE-0056: Allow trailing closures in guard conditions has been rejected. “The core team felt that the benefits from this change were outweighed by the inconsistency it would introduce with if and while.”

Proposals in review

Stephen Canon’s proposal, SE-0067: Enhanced Floating Point Protocols, is under review. So far, feedback is light but positive.

The current FloatingPoint protocol is quite limited, and provides only a small subset of the features expected of an IEEE 754 conforming type. This proposal expands the protocol to cover most of the expected basic operations, and adds a second protocol, BinaryFloatingPoint, that provides a number of useful tools for generic programming with the most commonly used types.

Erica Sadun’s proposal, SE-0068: Expanding Swift Self to class members and value types, is under review. Currently, there’s a lot of mixed feedback.

Within a class scope, Self means “the dynamic class of self”. This proposal extends that courtesy to value types and to the bodies of class members by renaming dynamicType to Self. This establishes a universal and consistent way to refer to the dynamic type of the current receiver.

Mailing lists

Max Howell started a discussion on allowing further module organization in SwiftPM. Currently the module layout rules prevent you from grouping related modules in subdirectories, Max discusses possible solutions to allow this. He also notes that package authors have a clear preference toward a root Sources/ directory and suggests making this required, that is, using src/ and other variants would be errors.

Nate Cook asked for feedback on a draft proposal to expand the min() and max() sequence methods. “This proposal would expand on the min() and max() sequence methods to add methods that return the corresponding index for a collection, efficiently find the minimum and maximum elements or indices at the same time, and provide extension points for sorted collections to provide all these results more efficiently.”

Finally

And finally — if you needed help decoding that WWDC announcement, Erica Sadun can help. 😄