Book Image

Swift 3 New Features

By : Keith Elliott
Book Image

Swift 3 New Features

By: Keith Elliott

Overview of this book

Since Swift was introduced by Apple in WWDC 2015, it has gone on to become one of the most beloved languages to develop iOS applications with. In the new version, the Swift team aimed to take its adoption to the next level by making it available for new platforms and audiences. This book will very quickly get you up to speed and productive with Swift 3. You will begin by understanding the process of submitting new feature requests for future versions of Swift. Swift 3 allows you to develop and run your applications on a Linux machine. Using this feature, you will write your first Linux application using the debugger in Linux. Using Swift migrator, you will initiate a conversion from Swift 2.2 to Swift 3. Further on, you will learn how to interact with Cocoa libraries when importing Objective C to Swift. You will explore the function and operator changes new to Swift 3, followed by Collection and Closure changes. You will also see the changes in Swift 3 that allow you write tests easier with XCTest and debug your running code better with new formats as well. Finally, you will have a running server written completely in Swift on a Linux box. By the end of the book, you will know everything you need to know to dive into Swift 3 and build successful projects.
Table of Contents (16 chapters)
Swift 3 New Features
About the Author
About the Reviewer
Function and Operator Changes – New Ways to Get Things Done

Swift evolution process

While Apple and the Swift team each have tons of great ideas on where Swift can go, it's important to remember that they aren't the only ones with ideas. In fact, the Swift team fully realizes this, and in response has created a process for you to submit your big or small ideas to help shape the Swift language.

The Swift evolution process encompasses all things related to taking a raw idea from inception through discussion and dialog and hopefully ending at an accepted proposal that developers can implement for production release. The goal of the process is to have active engagement within the community in order to steer the direction of the language while remaining true to the vision of Swift. In practice, that might translate into adding new features that make the language easier to use or removing features that no longer fit the vision of Swift. You can participate by proposing a new idea, or discussing and reviewing the proposals of other community members.

Swift evolution proposal steps

Here are the steps required to get a new idea moved into an accepted proposal:

  1. Check for similar proposals: It's important to do your homework and make sure that your idea hasn't already been proposed and/or rejected. Spend time reviewing proposals and their states. You can check the Commonly Rejected Proposals list for this task.

  2. Tell others about your idea: Most of the discussions around new ideas take place on the swift-evolution mailing list. This is where you should create a draft of your idea, along with the problem it addresses and some context on a solution.

  3. Create your proposal: Using the proposal template found here, you elaborate on your idea and continue to socialize it on the evolution mailing list.

  4. Request a review: When you believe your proposal is ready for a formal review by the core team, you submit a pull request to the swift-evolution repository When your pull request is accepted, your proposal will be given a proposal number and assigned a core team member to facilitate the review.

  5. Respond to feedback: It's your job to respond to questions and feedback on your proposal on the mailing list. This is especially important during the review period.

If all goes well, your proposal will navigate through the proposal states below during the review process and will be accepted.

  • Awaiting review: Until the proposal is assigned a date period for review, your proposal remains in this state.

  • Under review: Your proposal is undergoing public review on the swift-evolution mailing list.

  • Under revision: If you are given feedback during the under-review state, you are given an opportunity to address and modify your proposal.

  • Deferred: Decision postponed because it doesn't meet the criteria for the upcoming major Swift release. In this state, your proposal will be reconsidered when scoping for the next major Swift release.

  • Accepted: Accepted and new work can begin or is actively being done to implement your accepted proposal. An announcement will also go out to let the community know of a new accepted proposal for the upcoming release.

  • Rejected: Considered but rejected by the core team.

Here are some key things to remember about the review process. It doesn't start until a core team member (review manager) accepts your pull request for the proposal. Once accepted, the review manager will coordinate a review period with you and any other authors of the proposal to start a formal public review. The review period is a week long in most cases, but can be longer depending on the scope and complexity of changes outlined in the submitted proposal. Finally, the core team, not just the review manager, will make a decision on the proposal using the comments from the swift-evolution mailing list to help base their decision.