As well as adding features to Swift 3.0, Apple is taking features away. Here are some removed features for Swift 3.0.
- Currying func declaration syntax
- var in function parameter lists
- ++ and -- operators
- C-style for loop
- Implicit tuple splat in calls
"Some of these, I realise, may be polarising or controversial," says Kremenek. But he points out that they are the result of extended discussion with the developer community, and all the logs are available online.
How to write apps with Swift 3: Install Xcode 8 beta
Swift 3.0 is now available to all developers, and you don't need to be part of the paid-for Apple Developer Connection to start using it. Downloading the Xcode 8 beta enables you to start using the Swift 3.0 language right away. Apple has also made the Swift 3 Programming Language guide available on iBooks Store, so you can get up and running with the new features and syntax.
How to write apps with Swift 3: What does Swift being open-source mean?
As of December 2015, Swift 2 was open source. But what does that mean for programmers and app users?
Open-source typically means that the source code behind a program, or programming language, is made available to the general public. Coders can then inspect, modify and deploy the program wherever they want.
In practice this means that developers can take the Swift programming language and build it for deployment on non-Apple operating systems. In particular we now see Swift on Linux OSes (because both Linux and OS X share a similar underlying Unix-like structure).
Theoretically you could also see Swift implemented on Windows computers eventually, although we are still waiting to see a usable version of Swift on Windows. There are also rumours that Google, which currently uses Java for Android, could move to Swift. We think this is unlikely, especially after Google won its API in Java copyright case against Oracle.
Great! Will we be able to run iOS apps on Android phones?
While you'll be able to use Swift code on other devices, don't believe that this means you'll be seeing OS X and iOS software running on Windows and Android. While it'll make it easier to port software from one device to another, we expect Apple to retain control of its SDKs (Software Development Kit). While we don't know which parts of Swift Apple intends to make open-source, we believe Apple will still retain the source code for Xcode, so you'll still be using a Mac to develop OS X and iOS software.
Sign up for CIO Asia eNewsletters.