The case for Apple's Swift becoming a 'first-class' language for Google's Android

The Swift programming language serves as a powerful tool for Apple (NASDAQ: AAPL) iOS, OS X, tvOS and watchOS developers. But in the future, Swift may transform the way Android developers build apps, too.

Swift went open source in December, and since that time speculation has mounted over whether Google (NASDAQ: GOOG) may utilize Swift as its primary language for Android.

The Next Web this month cited unnamed sources who said Google is considering Swift as a "first-class" language for Android -- a move that could transform both the iOS and Android development spaces. 

Sound unlikely? Maybe not -- here are a few reasons why Swift for Android may be a great idea.

Swift alongside Java could open the app market further

Today, Android supports Java as its primary language, but that does not necessarily mean Swift would (or should) replace Java immediately. 

The Next Web pointed out sources said Swift "is not meant to replace Java ... but Google considers Swift to have a broader 'upside' than Java."

Because Swift is open source, Google also could adopt the programming language without having to alter its own open source mobile structure.

"If Google embraces Swift fully, with support for all the devices and the latest APIs available in Java, then the impact will be very large to both Android and iOS developers," Bill Ray, senior research analyst at market analysis firm VisionMobile, tells FierceDeveloper.

However, Ray said he is skeptical about whether Java and Swift could co-exist on Android. 

Rishabh Chowdhary, inMobi

Chowdhary

"We consider (Google embracing Swift) unlikely given the investment Google has already made in Java," he said.

Swift is a 'more approachable' language

Swift represents the fastest-growing language for mobile developers, according to the VisionMobile "State of the Developer Nation Q1 2016" study.

Twenty-two percent of mobile developers currently leverage Swift, according to the study. Comparatively, only 5 percent of respondents named Objective-C, a.k.a. "the once-mandated language of iOS developers," as their primary language. 

"Swift is definitely more approachable and includes full-featured programming language compared to Objective-C," said Rishabh Chowdhary, head of solutions engineering at mobile advertising platform provider inMobi. "It already supports a lot of open source code and dynamic libraries when it comes to developing games and more complex applications."

DeveloperNation study

Source: DeveloperNation

Swift for Android, meanwhile, may help both iOS and Android developers reduce their costs -- or cause developers' revenues to plummet.

"We see significant cost savings for app publishers and developers, assuming that Swift for Android and iOS could be kept in sync," Ray said. "We also see potentially less revenue for developers currently building for two separate native platforms, as cross-platform approaches tend to result in subpar results compared to native apps."

On the other hand, Swift for Android could provide significant growth opportunities for both iOS and Android developers. 

"Most mobile tech companies have independent iOS/Android developers owing to the language constraints per platform," Chowdhary said. "We should now see equal opportunities and a push away from the traditional Java language which current developers would be using on Android."

Hybrid app developers have the biggest opportunity

Swift for Android remains a pipe dream for many developers. And if and when Swift for Andoird becomes available, the programming language offers no guarantees. 

Jez Harper, technical director at app development company Tús Nua Designs, pointed out Swift is still relatively new and it may take months or even years before it becomes as popular as Java. 

Jez Harper, Tus Nua Designs

Harper

"I suspect there would be the initial 'give it a go' for any new apps being developed when (or if) Swift for Android is released, but I doubt there will be a rush to rewrite existing Android apps in Swift," he said. 

Ultimately, hybrid app developers might be the first to embrace Swift for Android, according to Harper. 

Swift for Android would empower these developers to create libraries of functions that could be used for iOS and Android.

As a result, Harper said Swift for Android could prove to be a viable programming language that could benefit hybrid app developers globally. 

Google's 'lack of control' over Oracle's Java could prompt a language shift

Harper says Swift represents the future for iOS development and believes Objective-C eventually will "fade away and be dropped."

He also notes the development of a Swift for Android release could depend on what happens between Google and Oracle, which provides Java.

"I suspect that Google would prefer to move away from the lack of control that they have over the Java language, so I believe that Google will eventually move to a different language," Harper said. "As Swift has been outsourced, [this move] makes sense."

Moreover, Swift for Android could represent nothing more than a backup plan for Google.

"A port of the Swift language will become available for Android either from Google or the community, making it possible to port basic applications that will compile for both platforms, but such applications won't have access to the best and latest features of Android," Ray said. "We believe that it's unlikely that Google will make Swift a first-class citizen on Android."

So should Android developers start prepping for Swift sooner rather than later?

For developers, the future of programming will move more towards real-time interactions with their codes, Chowdhary said.

As such, Chowdhary says the push for flexible programming languages may lead to the launch of Swift for Android within the next year. 

"In at least three quarters from now, we should start seeing major adoption of Swift for Android," he said. 

Top image: Sample of Swift programming language. Source: Apple

Suggested Articles

Here are the stories we’re chasing today.

Here are some other stories we’re following.

Here are the other stories we’re chasing today.