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? 

swifticon

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:

We’re certainly open to the community creating a Windows port, and there’s a good foundation for that in that the LLVM and Clang environments that are foundations for building and compiling Swift have been ported to Windows.

We fully support the community doing that port. In terms of us getting the [open source] project off the ground, we wanted to focus our energy on our platforms and Linux to start.

 

swiftbanner

The Swift language is organized as a set of projects, each with its own repositories:

  • The Swift compiler command line tool
  • The standard library bundled as part of the language
  • Core libraries that provide higher-level functionality
  • The LLDB debugger which includes the Swift REPL
  • The Swift package manager for distributing and building Swift source code

You can submit pull requests or fork to create your own project.

Does this mean that Swift has escaped the proprietary boundaries of Apple?

Yes, and it can become a general purpose language just like C++ or JavaScript.

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.

swifticon

More Information

https://swift.org/

https://github.com/apple/swift

Related Articles

Apple's New Language - Swift       

Swift 2 To Be Open Source       

Top Languages 2015 - Stasis But For Go And Swift       

IEEE Custom Ranks Programming Languages       

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on, Twitter, FacebookGoogle+ or Linkedin

 

Banner


DuckDB And Hydra Partner To Get DuckDB Into PostgreSQL
11/11/2024

The offspring of that partnership is pg_duckdb, an extension that embeds the DuckDB engine into the PostgreSQL database, allowing it to handle analytical workloads.



Go At Highest Rank Ever in TIOBE Index
20/11/2024

Go is currently in 7th place in the TIOBE Index for November 2024. Not only is this is the highest position it has ever had, it's percentage rating is almost equal to its all-time-high. Will Go contin [ ... ]


More News

 

espbook

 

Comments




or email your comment to: comments@i-programmer.info

 

Last Updated ( Friday, 04 December 2015 )