Google is said to be considering Swift as a âfirst classâ language for Android

About the time Swift was going open source, representatives for three major brands â Google, Facebook and Uber â were at a meeting in London discussing the new language. Sources tell The Next Web that Google is considering making Swift a âfirst classâ language for Android, while Facebook and Uber are also looking to make Swift more central to their operations.
Googleâs Android operating system currently supports Java as its first-class language, and sources say Swift is not meant to replace Java, at least initially. While the ongoing litigation with Oracle is likely cause for concern, sources say Google considers Swift to have a broader âupsideâ than Java.
F**k it, we'll do it live!
Our biggest ever edition of TNW Conference is fast approaching! Join 10,000 tech leaders this May in Amsterdam.
Swift is also open source, which means Google could adopt it for Android without changing its own open source mobile structure.

Could Google do it?
Born at Apple as a replacement to Objective C, Swift quickly found favor with developers as an easy-to-write language that shed much of the verbosity and clumsy parameters other languages have. It was introduced at WWDC 2014, and has major support from IBM as well as a variety of major apps like Lyft, Pixelmator and Vimeo that have all rebuilt iOS apps with Swift.
Swift canât be copy-pasted for any platform, though. Specifically, Android would need a runtime for Swift â and thatâs just for starters.
Google would also have to make its entire standard library Swift-ready, and support the language in APIs and SDKs. Some low-level Android APIs are C++, which Swift can not currently bridge to. Those would have to be re-written.
Swift would also not be useful in bridging higher level APIs in Java; theyâd have to be re-written as well.
Using Swift for Android is not impossible, though. Late last year, developer Romain Goyet toyed with Swift for Android â and had some success. While that project was completed well ahead of Swift being open source, it nonetheless proved that it can be done.
That project used the Android NDK, which allows other languages to be loosely implemented into Android. With an open source Swift and support from Google, Android apps wouldnât require that toolkit.
All told, Google would have to effectively recreate its efforts with Java â for Swift. If the company is motivated enough, itâs very possible to do so without compromising on its open source values or ruffling any developer feathers along the way.

Kotlin
Just reaching its potential, sources also claim Kotlin is being discussed as a first class language for Android.
Like Swift, Kotlin is object oriented with a focus on safety. Unlike Swift, Kotlin works with Android Studio, Googleâs IDE for Android development.
Unfortunately, sources tell The Next Web that Googleâs current mindset is that Kotlin is a bit too slow when compiling.
But, Kotlin is billed as a language that âworks everywhere Java works,â and has âseamlessâ support for projects that mix it and Java.
It would be much less work on Googleâs end to get Kotlin up and running for Android, but could be a tedious transition for developers.

Facebook and Uber
Facebookâs interest in Swift appears to be completely founded in technological advancement.
A benefit of Swift is that it can serve as both a forward-facing language as well as a server-side one. For a product like Facebook, thatâs beneficial; apps and servers can speak to one another seamlessly, and it potentially gives the company a wider scope to write APIs for services.
And work may have already begun. A Github pull request in the Swift repository named âPort to Androidâ was made by a Facebook employee. Itâs not clear if his work was official Facebook business or not, though we have confirmed Facebook is already working with Swift internally â itâs just not known how thoroughly.
Uberâs road to Swift is probably a bit cleaner than either Google or Facebook. Though there are many moving parts to Uberâs service (app, server and API), it can use Lyftâs transition to Swift as an example.
When Lyft migrated its iOS app to Swift, it was a ground-up remodel that took a lot of time and effort â but resulted in an app thatâs lighter, leaner and easier to maintain. Itâs not known how much (if any) of Lyftâs back-end uses Swift, but the company has been highly complimentary of Swift in its existing application.

When could a move to Swift happen?
The short answer: not anytime soon. The reason? Android.
But Swift is quickly finding its way. Several studies suggest itâs one of the fastest growing languages around, and has blown up since going open source (GitHub tells The Next Web the language is currently its 11th most popular). Demand for developers who know Swift is also exploding, which could be all the indication these three companies need to at least explore using Swift more thoroughly.
Googleâs onboarding for Swift would be long; it essentially has to rewrite every Android service, app and API. Google would also have to spearhead Swift support for Android â which is still only being poked and prodded at by clever developers in the Swift community.
In a way, Google has already begun moving away from bits of Oracle-flavored Java. Itâs now using the Open JDK for Android rather than the proprietary Java API, and may be considering a post-Java life altogether. Talks in London were said to be exploratory; Google is not yet pushing to move on from Java. While it would be a big undertaking, Swift is meant for speed and safety, and Swiftâs roadmap suggests it wonât be quite as difficult to use it for other platforms in the future, specifically when it comes to C++.
Though Kotlin is an alternative, itâs a very nascent language without the eager community Swift has.
Facebook and Uber face similarly daunting tasks when it comes to using Swift throughout, but can âand should â wait for Google to shoulder the load with Android. If the use of Swift is going to be as deep as our sources indicate (that is, all companies want to be using it for server side and forward-facing use cases), Android support is integral.
Moving to Swift for any of the companies also makes little sense unless itâs a thorough re-do, but itâs probably not quite as hard as it sounds. Services like Perfect prove that server-side Swift is ready, and itâs worth considering that Facebookâs engineers (perhaps from the Parse team) may already be working on this.
IBM is also working to make Swift ready for server-side functions.
But donât expect Google, Facebook or Uber to announce Swift-y plans anytime soon. Facebook and Google both have developer conferences on the horizon, and thereâs no indication that Swift will play a major part at either.
We reached out to all three companies for comment on the information our sources brought forward. All three declined to comment. Google specifically pointed to its ongoing litigation with Oracle as reason not to participate in this article. Make of that what you will.
Read next: Twelve South made a travel case for Apple Watch you'll actually want to use
Comments