Apple's Swift developers discuss enhancements coming in Swift 4.1

article thumbnail

AppleInsider is supported by its audience and may earn commission as an Amazon Associate and affiliate partner on qualifying purchases. These affiliate partnerships do not influence our editorial content.

Members of Apple's Swift Core team made a special appearance on the Swift Unwrapped podcast to discuss enhancements being rolled out as part of Swift 4.1 and how the company is expanding upon its efforts to engage with the community.

Apple's Doug Gregor, who works on the Swift compiler, and Ben Cohen, the release manager of the Swift Standard Library, joined the Swift Unwrapped discussion, focusing on improvements being made to generics and conditional conformances.

Apple's Swift 4.1 documentation explains that genrics enable developers "to write flexible, reusable functions and types that can work with any type, subject to requirements that you define. You can write code that avoids duplication and expresses its intent in a clear, abstracted manner."

The developers noted that Swift's Standard Library was originally designed from the start to take advantage of planned enhancements to generics, and now that Swift 4.1 is delivering a new "plateau" of support for generics, it is allowing them to "eliminate huge swathes of code" that is no longer necessary. Our goals for Swift are ambitious: we want to make programming simple things easy, and difficult things possible

The first beta of Swift 4.1 was released as part of the Xcode 9.3 and iOS 11.3 betas, and will ship when those releases are finalized, likely by the end of this month. Swift 4.1 is not binary compatible with 4.0, but is designed to be a source compatible update, meaning existing code should compile with the Swift 4.1 compiler.

Swift 4.1 also delivers improvements to the Swift Package Manager, Swift on Linux and brings "general quality improvements" to the compiler and Standard Library.

Apple first introduced Swift as a new programing language for Mac, iOS and other platforms in 2014. Since then it "has quickly become one of the fastest growing languages in history," the company notes on its website.

"Swift makes it easy to write software that is incredibly fast and safe by design. Our goals for Swift are ambitious: we want to make programming simple things easy, and difficult things possible."

In November, freelancer site Upworks noted that Swift development was one of the fastest-growing skills in demand, with 200 percent year-over-year growth.

In January, an analysis of data from GitHub and Stack Overflow stated that Swift had tied Objective-C to enter the top ten development languages in terms of usage and discussion among developers. That's a remarkable feat given that Swift is largely focused on Apple's platforms, despite its open development and support for Linux.

Apple has been working hard to promote Swift has a language, promoting its "App Development with Swift" curriculum being used at over 70 high school and colleges worldwide, along with developing the free Swift Playgrounds app to make it easy and even fun to learn for everyone with an interest in development.