Although this isn’t the first time the giant from Cupertino made a part of its source code public (with notable examples of CoreFoundation, Objective-C Runtime, ResearchKit and WebKit being open source for a long time already) and it’s surely not the first major company to do so (following Microsoft’s .NET and Google’s well-known Android releases), the Swift event marks a new chapter for not only Apple, but also for all developers, coming from various communities.
But what exactly does this mean for the industry and what should we expect from the project in the future? Those two questions will be my focus in the following article.
One of the most important things about Swift 2.2 is full Linux support. Although currently supporting only Ubuntu, it’s clear that Apple followed Microsoft in opening up to the penguin-powered operating system.
While Ubuntu has generally low usage share among desktop and laptop computers (excluding developers’ 🤓), it is a no. 2 OS among Linux servers. Ever since Apple announced Linux compatibility at WWDC this year, people started wondering whether Swift will be applicable for server-side backend development.
Now all we can tell is that it’s only a matter of time until a full-featured Swift web framework appears in the market. Oh, there is one already.
The project aims to reduce the process of adding dependencies to your projects to editing a Package.swift manifest and a single swift build command. Well, ideally. Turns out SPM has some troubles building and managing the dependencies and lacks the ability to build dynamic libraries (a.k.a. frameworks), so currently it cannot be used for OS X and iOS development – we have to stick with Carthage and CocoaPods for now.
The Swift Standard Library provides quite a lot of delicious stuff, including strings, numeric types, collections and pointers. But let’s face it: you can’t make a real useful program using just those types.
That’s why Swift team decided to fully reimplement Foundation framework in pure Swift, on top of already open CoreFoundation. Swift’s Foundation, like the language itself, will be Linux-compatible and inside it you may find almost all you need to create a CLI application, i.a.: NSData, NSDate, NSJSONSerialization, and so on. Unfortunately, as of the time of writing this post, not everything has been implemented yet, and many essential classes like NSURLSession, NSOperation and NSUserDefaults are still missing.
As can be seen in the evolution repository, there are two versions of the language already in the plans. The nearest one, minor Swift 2.2, focused on fixing bugs and implementation improvements, is bound to be released in Spring 2016.
What’s more interesting is the next major release, Swift 3.0, which is planned for Fall 2016. Its main goal is to stabilize the binary interface, although the following changes are already confirmed to be included:
Completely implemented generics, with focus on recursive protocol constraints
Apart of listing what’s coming, the evolution repository also provides a list of out-of-scope ideas for Swift 3.0, which include:
Built-in language-supported concurrency
Major new library functionalities
John Siracusa / Ars Technica
As can be seen above, the language creators’ goal for Swift 3.0 is to be a “Snow Leopard” release for Swift, laying down stable foundations for further language development.
What would “open source” mean if it weren’t open for community contributions? In fact, Swift encourages contribution in various forms, not just by pull requests. If you’d like to be a proud part of Swift’s evolution, here’s a list of things you can do:
Participate in the mailing lists, either by answering questions or by introducing new proposals
The Swift source opening is one of the most important events in the recent software engineering history and will definitely impact not only the future of Apple platforms, but also other general-purpose fields.
SPM, Foundation, XCTest are only the beginning of what is meant to be a major turn in programming language domination these days.