|Apple Open Sources Swift 2|
|Written by Alex Armstrong|
|Friday, 04 December 2015|
Apple's new language is now all grown up and ready to make its way onto other platforms. Does this mean that Swift has a future as a universal language?
Apple promised to open source Swift and it was slow in coming, but there is now a GitHub repository and it is under an Apache licence with a runtime exception - i.e. you don't have to add an attribution to code that gets compiled into your program.
As the Swift blog, which is also new, along with the Swift.org website, put it:
"Swift is now open source!
We are excited by this new chapter in the story of Swift. After Apple unveiled the Swift programming language, it quickly became one of the fastest growing languages in history. Swift makes it easy to write software that is incredibly fast and safe by design. Now that Swift is open source, you can help make the best general purpose programming language available everywhere."
This is a bit over the top, but it is good to have Swift as an open language. It also isn't clear how open source the language will be. After all, its the implementation that has been open sourced, not the language definition. However, it does seem that it is going to be possible to create implementations for other platforms as this seems to be one of the intentions in Apple's open sourcing:
"One of the most exciting aspects of developing Swift in the open is knowing that it is now free to be ported across a wide range of platforms, devices, and use cases."
There is already a Linux port and Ubuntu binaries can be downloaded. Given the apparent enthusiasm for the language, others will follow. However, don't expect to use Swift to port iOS applications to other platforms because the necessary libraries haven't been open sourced and very likely never will. To be clear Apple is still going to retain control of the offical iOS based version of Swift and you are still going to have to pay to use it and get your apps into the app store.
Swift on Linux doesn't depend on any Objective C libraries and some of these are for things like strings and the port is admittedly a work in progress. It only works on x86_64 at the moment, for example.
Of course the real question is will there be a version of Swift for Windows. Apple's Senior Vice President of Software Engineering Craig Federighi was asked by TWN what the position was:
The Swift language is organized as a set of projects, each with its own repositories:
You can submit pull requests or fork to create your own project.
Does this mean that Swift has escaped the proprietary boundaries of Apple?
Programmers who would have been put off using it because its future was tied to Apple no longer have to worry. However, as a general purpose language it isn't clear that it has an advantage. As an alternative to Objective-C in the creation of iOS apps it is a huge step forward - although there are many Objective-C programmers who would argue with this opinion. In this niche its future is certain, but does it really have any attraction when all you can create are command line applications? As a language it also has no features that aren't present in other languages that have large user bases. It is like a poorly thought out C# with a few extras and omissions. As a new language it offers nothing that is new.
In short as a alternative to Objective-C it works as an alternative to other languages it doesn't.
We will have to wait and see where open source takes Swift.
or email your comment to: firstname.lastname@example.org
|Last Updated ( Friday, 04 December 2015 )|