[フレーム]
BT

InfoQ Software Architects' Newsletter

A monthly overview of things you need to know as an architect or aspiring architect.

View an example

We protect your privacy.

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Unlock the full InfoQ experience

Unlock the full InfoQ experience by logging in! Stay updated with your favorite authors and topics, engage with content, and download exclusive resources.

Log In
or

Don't have an InfoQ account?

Register
  • Stay updated on topics and peers that matter to youReceive instant alerts on the latest insights and trends.
  • Quickly access free resources for continuous learningMinibooks, videos with transcripts, and training materials.
  • Save articles and read at anytimeBookmark articles to read whenever youre ready.

Topics

Choose your language

InfoQ Homepage News Apple Releases Swift 2.2 for OSX and Linux

Apple Releases Swift 2.2 for OSX and Linux

Leia em PortuguÃas

This item in japanese

Mar 21, 2016 2 min read

Write for InfoQ

Feed your curiosity. Help 550k+ global
senior developers
each month stay ahead.
Get in touch

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:

Swift's comments and test suite are on track to be one of the most correctly spelled and best indented ones in the industry!

— Chris Lattner (@clattner_llvm) 5 December 2015

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
Style

This content is in the Mobile topic

Related Topics:

Related Content

The InfoQ Newsletter

A round-up of last week’s content on InfoQ sent out every Tuesday. Join a community of over 250,000 senior developers. View an example

We protect your privacy.

BT

AltStyle によって変換されたページ (->オリジナル) /