Swift 2 To Be Open Source
Swift 2 To Be Open Source
Written by Alex Armstrong   
Wednesday, 10 June 2015

When Apple introduced its Swift language there wasn't much point in being interested in it unless you were an iOS programmer. Now, with Apple promising to open source the new Swift 2.0, the situation has changed. What's in Swift for the rest of us?

swifticon

 

iOS development used to be done in Objective C, Apple's object-oriented version of C. Objective C is a language that seems strange to most programmers because of its strange back to front syntax. However, Objective C has been open source for some time and if you wanted to use it under Linux then you could. This isn't to say that Objective C was enthusiastically open sourced by Apple - it did its best to avoid it and to make it difficult. In particular, it did not release the runtime libraries, only the compiler, making it necessary for the open source community to create its own runtimes. 

When Swift was introduced as a more modern language in which to write OSX and iOS applications, the question was will it be open-sourced?

Now at this year's WWDC, Apple has announded that it will be open sourcing Swift 2 under an OSI approved permissive licence. A Linux compiler is going to be added to the iOS and OSX compilers before the whole lot, compilers and libraries, are open-sourced later in the year. No menton of a Windows or Android compiler, but open source being what it is there is likely to be one for each popular platform in time. The compiler is based on LLVM and so is inherently portable. 

The Swift blog says: 

  • Swift source code will be released under an OSI-approved permissive license.

  • Contributions from the community will be accepted — and encouraged.

  • At launch we intend to contribute ports for OS X, iOS, and Linux.

  • Source code will include the Swift compiler and standard library.

  • We think it would be amazing for Swift to be on all your favorite platforms.

Swift is a C#-like language - strongly typed and object oriented. Version 2.0, announced at WWDC, introduces new features like a better error handling model and a faster interface with the existing SDKs - which are mostly written in Objective C. 

So are we all going to drop our favourite languages and start using Swift?

No, of course not. As a language Swift isn't particularly innovative and you can find most of its features in C# and alternatives like Python and Ruby are as rich, if not more so, in terms of language constructs. The only advantage Swift has is that people use it to write OSX and iOS applications. The idea of Swift being available on other systems is more likely to encourage people to port their existing apps to these new platforms - assuming the UI and other device-specific library problems can be solved.

Could we see Apple apps on Windows and Android?

Possibly. 

Microsoft has already announced that it is making it possible to port Objective C iOS apps to Windows Phone and having Swift open source makes it possible to take this forward for future apps. 

This all makes one think - "why?"

In particular, why has Apple promised to open source Swift with a permissive licence that allows the likes of Microsoft, Samsung and even Google to take the Swift code base and weave it into commercial products?

 

swifticon

Banner


Amazon Releases Managed Message Broker Service for ActiveMQ
05/12/2017

Amazon has released Amazon MQ, a managed message broker service for Apache ActiveMQ, the open-source message broker that supports queues and topics, durable and non-durable subscriptions, push-based a [ ... ]



$500,000 Inaugural Alexa Prize Awarded
29/11/2017

A team of students from the University of Washington has won the inaugural Alexa Prize and presented a cheque for $500,000 at AWS re:Invent. The $1 million prize for being able to sustain a conversati [ ... ]


More News

 

 
 

 

blog comments powered by Disqus

 

Last Updated ( Friday, 12 June 2015 )
 
 

   
RSS feed of news items only
I Programmer News
Copyright © 2017 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.