Apple’s in-house programming language, Swift, has gone open source. The source code of the language along with the code for a brand new package manager is now available for developers to play with as they will, under the Apache license.
Work on Swift, the brainchild of Chris Lattner, begun in 2010 and it was formally unveiled by Apple at its developers conference in 2014. At the time, Apple had also published a free iBook guide to help developers in their first-hand experience with the language.
The language derives its inspiration from a whole bunch of others including Objective-C, Ruby, Python, C# and Rust and is mainly aimed at developing apps and software for iOS, OS X and WatchOS.
Swift is multi-purpose and can be used to create desktop as well as iOS apps. What’s more, it comes with an integrated command line tool that can be used to run programs directly against files and folders. Apple has described programming with Swift as “interactive and fun” and the language can also run side-by-side with objective C — thus making integration with pre-existing applications a possibility.
One of the major advantages of Swift is the fact that inferred types make code cleaner and less prone to mistakes, while modules eliminate headers and provide namespaces. Memory is managed automatically, and you don’t even need to type semi-colons. And there’s ‘Playground’, which gives the results of your code in real time. Be it a loop or a normal code, you can see the result in the timeline.
Thanks to Apple’s open-source-ing, all the flexibility and safety of the language can now be deployed by developers to create programs without the need for attribution.
For more information, you can visit Swift’s official website.