BT

New Early adopter or innovator? InfoQ has been working on some new features for you. Learn more

Apple Releases Swift 2.2 for OSX and Linux

| by Alex Blewitt Follow 2 Followers on Mar 21, 2016. Estimated reading time: 2 minutes |

Apple has released Swift 2.2, the latest version of their mobile and server programming language. This version is the first official release that has been contributed to by open-source developers, including contributions from 212 non-Apple contributors. Some of these are typos, contributed in the first few days of Apple's open-source Swift release, leading Chris Lattner to proclaim:

The release also includes a number of enhancements that have followed Swift's evolution process, including some proposed by non-Apple contributors:

The Swift project has expanded to allow others to commit directly to the repository, for those that have published good work in the past.

Swift 2.2 is included with Apple's release of Xcode 7.3, which has also been published. The official release means that iOS applications can now be submitted to the AppStore using Swift 2.2. For Linux builds, official binaries are available for Ubuntu 14.04 and 15.10. However, the Linux port is not yet complete; there are a number of missing components in the standard swift core libraries that are scheduled to appear in Swift 3 later this year. The IBM Swift sandbox is currently running a development build of Swift 3.0 but may add a Swift 2.2 option as well in the near future.

The ongoing development of the Swift Package Manager means that it is not yet part of the official builds; it too is scheduled to be released with Swift 3.0.

There is an updated version of the Swift Programming Language ePub document, as well as the HTML version available at Apple.

Changes in Swift 2.2

There are a number of changes in Swift 2.2 which will affect existing source code written for previous versions. These include:

  • Removal of the C-style for loops, along with the increment ++ and decrement -- operators.
  • Functions can no longer be defined as taking curried arguments directly, but instead return a function that takes an operator.
  • Objective-C selectors can be referenced using #selector(doSomething) instead of Selector("doSomething"), and is now compile-time checked.
  • Most keywords can now be used as argument labels
  • Associated types can now be related to a protocol, allowing them to have generics in classes that adopt the protocols.

The language book also includes a description of Automatic Reference Counting which may have not been clear before.

Swift 2.2 is available for immediate download via the Swift website.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT