Slashdot Mirror


Swift 5 Released (swift.org)

Ted Kremenek, a manager of the Languages and Runtimes team at Apple, writes: Swift 5 is now officially released! Swift 5 is a major milestone in the evolution of the language. Thanks to ABI stability, the Swift runtime is now included in current and future versions of Apple's platform operating systems: macOS, iOS, tvOS and watchOS. Swift 5 also introduces new capabilities that are building blocks for future versions, including a reimplementation of String, enforcement of exclusive access to memory during runtime, new data types, and support for dynamically callable types.

4 of 56 comments (clear)

  1. Good thing is, can deploy to older iOS versions by SuperKendall · · Score: 3, Informative

    It's great that Swift has finally got ABI compatibility, the main benefit to start it an easier time distributing frameworks that can be dynamically loaded.

    Another great aspect of Swift 5 is that you can still build apps all the way back to iOS 11 (maybe earlier). So you can still convert apps to use the latest Swift without worrying about excluding users that prefer to wait for a while before upgrading (though the practical reality is that after a year, almost all iOS users have upgraded).

    One interesting change that happened with Swift 5 is that it switched internally from storing Strings as UTF-16, to UTF-8 - it helps performance and bridging to languages like C.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  2. I can't wait! by pak9rabid · · Score: 2, Informative

    Oh sweet, another forced Xcode upgrade that will no doubt bust up all my app's existing code and require hours of effort to get back to where I was again! Thanks Apple!

    1. Re:I can't wait! by UnknowingFool · · Score: 3, Informative

      Did Apple hide this from you? I mean you developed apps using Swift fully knowing it wasn’t ABI stable. And now it’s Apple’s fault for making it stable. As far as I know you could have kept using ObjC.

      --
      Well, there's spam egg sausage and spam, that's not got much spam in it.
    2. Re:I can't wait! by Anubis+IV · · Score: 3, Informative

      Well, they sure weren't very upfront about it not being ABI stable in the past.

      Other than dropping by your home to deliver the news in person, I honestly don't know how they could have been more up front about it. They talked about it in a keynote, WWDC sessions, written roadmaps, e-mail lists, tech podcasts featuring Apple engineers as guests, and other documentation. Hell, I've never even coded a line in Swift and I felt like I couldn't avoid the information had I wanted to, simply because it was constantly coming up in software development circles.

      Now, that doesn't change the fact that the plans have indeed changed over the years. I think I even remember them suggesting that Swift 3 would be ABI stable at one point, which clearly didn't end up being the case. But they've been keeping people in the loop all along and explaining the delays. Even so, most of the language reached ABI stability in 4.x and earlier, so the benefits of full stability in 5.0 are somewhat muted.

      version 4 would be the last version to break backwards compatibility

      Given that the only people who won't be able to run Swift 5 code are the ones whose devices won't have support for iOS 13 (i.e. devices from likely 2013 and earlier), this only affects organizations supporting apps on unsupported hardware from 6+ years ago (i.e. a vanishingly small number of organizations, at least when it comes to mobile). If you're a developer in that space, you're already familiar with the hassles associated with supporting outdated hardware, such as needing to link against outdated libraries and frameworks or using an older version of a language. It's the sort of stuff we have to do all the time in industry, so I'm not sure why anyone would be bothered by it.