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.

10 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. Fork You Apple! by williamyf · · Score: 1, Insightful

    If anyone is anoyed by this "Breaking of source" change, feel free to fork the hell out of the project (is open source after all).

    Me? I do not speak Swift yet, and for the looks of it, will wait until version 8 or so to start learning.

    --
    *** Suerte a todos y Feliz dia!
  3. welcome to python by nimbius · · Score: 4, Insightful

    where we have 5 versions, 3 syntax distinctions, and flipping through them like a rolodex while muttering "what in the name of god does this code need to run" is a time honoured tradition.

    --
    Good people go to bed earlier.
    1. Re:welcome to python by h33t+l4x0r · · Score: 4, Insightful

      Python 2 is still maintained while developers port code to Python 3.

      That's one way to put it. Another way to put it would be:

      Python 2 is still maintained because developers aren't porting their code to Python 3.

      It's 9 years later, at some point Python is going to have to give up on Python 3 and move on to a Python 4 that is backwards compatible with Python 2.

  4. Re:Lol by bug_hunter · · Score: 3, Insightful

    And thank goodness they do that.
    Otherwise we'd be on OS 9x on PowerPC.

    --
    It's turtles all the way down.
  5. Re:Garbage by lucm · · Score: 3, Insightful

    Nobody gets raises for being a cunt. Come up with a plan to fix this in a cost-effective manner, and maybe next time they'll pay attention.

    --
    lucm, indeed.
  6. It can join python 3, vb.net, and perl 6 by Billly+Gates · · Score: 1, Insightful

    Now it won't ever be implemented. Shoot we would still be having an IE 6 internet too if it were not for MS forcing corps to stop using it. People hate change and it is impossible unless you kill the original but good luck as Swift is open source

  7. Re:Swift is always doing non compat updates by uohcicds · · Score: 3, Insightful

    Yes. It's not like people weren't warned about this. The Swift 3 announcement at WWDC back in June made this very very explicit indeed, as indeed did swift.org from even earlier.

    --
    It's not you: I'm just this horrifically socially awkward with everybody.
  8. Re:Meanwhile, back in C land... by west · · Score: 4, Insightful

    Well, C was created in 1972, so that did give them some 20+ years before stability...

  9. If you think this is bad... by __aaclcg7560 · · Score: 1, Insightful

    A non-programming friend downloaded Swift Playgrounds app on his iPad to learn Swift programming. Not sure why it introduced him to nested functions right off the bat. Anyway, he's frustrated because his code doesn't work and he wants someone else — probably me — to figure out why. I told him if he wanted to be a real programmer he needed to debug his own code before asking someone for help.