In Defence of Adopting Swift on Android

Apple did a bold thing and switched their platform programming language from Objective-C to something new and different — Swift.

Swift is a next-generation programming language that is well thought out and easy to learn. It has a lot of flexibility and incorporates many modern programming concepts other languages are trying to retroactively add to their systems.

Java is Old

Java has been around for 20 years. It has not exactly kept up with the development all this time. It’s an easy language to learn but cumbersome in many modern environments, including Android. It’s time to move on.

The Fear of Apple

Swift is created and controlled by Apple. We still remember the platform wars between iOS and Android that ignited numerous fanboy flamewars everywhere around the web.

I think we can move on from the fear of Apple already. The platform wars are over and both platforms won. iOS or Android won’t be going anywhere anytime soon.

Numbers are Clear

Ignoring all the potential technical problems of creating a shared language between iOS and Android would be a massive financial win. Nearly 100% of mobile projects are written on Android and iOS nowadays. Around 50% of the code is business logic, API calls etc non-UI-, non-Framework-specific code. All of this code could be shared between the Android and iOS projects. Arguably, some parts would require some creative thinking but most parts code sharing would be very straightforward. In fact, MS has created a business around this idea, Xamarin. While Xamarin has other problems sharing the business logic code between iOS and Android is certainly smart.

Being able to share the business logic would create massive savings in all mobile projects both in testing and coding. The time saving would be directly reflected in delivery costs of mobile projects making it more likely that the allocated budgets can be better spent creating better quality software as well as more apps. Both ecosystems would see a significant boost in both quantity and quality.

“Load Balancing” mobile development

Shared business logic would also allow “load balancing” of mobile team working time. It’s often the case that one of the platforms is ahead of the other. In situations where the business logic modules are shared the faster team can always be allocated to the business-logic duty.

Option to allocate developers more flexible way would be a big saving in many projects.

Shared Libraries

Now, I’m not advocating sharing the UI layer or platform specific libraries and executing some kind of cross-platform strategy. Those set to fail.

However, what a shared programming language would enable is a massive shared library project ecosystem. Many parts of the non-UI code libraries could be made cross-platform.

The benefit beyond the obvious would be the teams understanding each other’s architecture and functionality beyond the the very simple.

Understanding the Other Platform

Sharing a language would not allow developers from Android platform to jump into iOS projects. Working on a platform requires much more than just understanding the programming language. However, sharing a language would allow the teams to discuss details on a whole new level. Sharing knowledge is always good for business!

No Cross-Platform Framework Lag or Crap

One of the reasons Xamarin as a platform is really not working well is the constant lag of 3rd party system. Everything new has to always go through this 3rd party framework and all features must be added by the cross-platform tool maintainers. This is not a sustainable model and Xamarin is not really suitable for most projects.

In case of sharing a programming language the platform features would still be 1st party development and the “Xamarin-problem”.

Technically, It’s not That Easy

OK. It’s not really that easy. It would be a massive project to get Swift adopted as a first-tier language on Android. I’d argue that in long term the effort would be worth it. The savings in the industry would be massive. And if someone can do it… it’s Google. They have the resources and skills to make magic happen.

It’s worth noting that things are already moving on the Swift for Android front. In fact, Apple merged the Swift for Android project to their official Swift repo in Github. While this project isn’t ran by Google and unlike some badly researched news articles reported this is no way indication that Google is even considering the option.

I think Swift has matured as a great language. Apple is doing a lot of things right with the language. Its Open Source license also allows anyone to work with it without having to fear receiving letters from Apple’s lawyers.

In my opinion not going for Swift as the next programming language of Android would be a missed opportunity and a mistake. I’m not claiming that it would be easy or that there’s no problems that would have to be solved but in the long run it would yield big savings for any company working in mobile improving the ecosystems of iOS and Android.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.