Slashdot Mirror


Apple Releases Swift 3.0, 'Not Source-Compatibile With Swift 2.3' (infoworld.com)

An anonymous Slashdot reader quotes InfoWorld: "Move fast and break things," the saying goes. Apple does both with the 3.0 version of its Swift programming language...its first full point revision since it became an open source project... In a blog post detailing the full body of changes for Swift 3.0, Apple singled out the two biggest breaking changes. The first is better translation of Objective-C APIs into Swift, meaning that code imported from Objective-C and translated into Swift will be more readable and Swift-like. The bad news is any code previously imported from Objective-C into Swift will not work in Swift 3; it will need to be re-imported.

The other major change... Most every item referenced in the standard library has been renamed to be less wordy. But again, this brings bad news for anyone with an existing Swift codebase: Apple says "the proposed changes are massively source-breaking for Swift code, and will require a migrator to translate Swift 2 code into Swift 3 code."

Apple will provide migration tools in version 8.0 of their XCode IDE, "but such tools go only so far," notes the article, questioning what will happen to the Linux and Windows ports of Swift.

3 of 148 comments (clear)

  1. better now by goombah99 · · Score: 5, Insightful

    than later when there's a huge code base.

    --
    Some drink at the fountain of knowledge. Others just gargle.
  2. One word: Courage. by PhrostyMcByte · · Score: 5, Funny

    The courage to move on, to do something new that betters all of us.

    The Swift 2.0 language is more than 12 months old. It has its last big innovation about 6 months ago. You know what that was? They deprecated prefix and postfix operations, they made it smaller. It hasn't been touched since then. It's a dinosaur. It's time to move on.

  3. Re:Swift is always doing non compat updates by pushing-robot · · Score: 5, Interesting

    The language just turned two years old, and they've been saying for a while that the language wouldn't be 'stable' until version 3.0.

    Nothing is perfect on day one, after all, and Swift borrowed a lot of terribly ugly library methods from Obj-C to make the transition easier. Cleaning all that up for 3.0 will cause some short-term headaches but make future code a lot less cumbersome.

    Hopefully from here on the changes will be relatively minor.

    --
    How can I believe you when you tell me what I don't want to hear?