Apple has released the latest version of Swift, the programming language used to create OS X, iOS, Apple TV & Apple Watch apps. Swift 3.0 is now available as part of Xcode 8. Here’s everything you need to know about the Swift language and its new features!
Here are some new features implemented in Swift 3.0. All function parameters have labels by default. Attribute arguments use a colon. Switch cases with multiple patterns have new functionality. Line control statements use the #sourceLocation(file:line) syntax. Wow, that’s dry.
One major thing we’re going to see with Swift 3.0 is the porting of Swift to other operating systems. According to the GitHub page, the Swift team intends to “make Swift available on other platforms and ensure that one can write portable Swift code that works properly on all of those platforms.” This will make it easier for Google to work with the language to enable cross development.
For safety, Swift introduced a system that helps address common programming errors like null pointers and introduced syntactic sugar to avoid the pyramid of doom that can result. I love that description so much, that it’s my favorite feature of the language.