I wrote a month ago, prior to Microsoft's Build 2016 developer conference, that Microsoft should buy Cyanogen and rebuild their mobile offering based on a platform which has actual users. But as ever, Microsoft seems to be a half-step behind where things are actually going, expecting users to adopt the Microsoft way after those users have already gone.

Xamarin's offering…

It was widely anticipated - or at the very least hoped - that Microsoft would announce at Build 2016 that they were offering their recently-purchased Xamarin development tools for free within Visual Studio. And indeed, this they did.

But true to form, this is not where developers are going. At least, not the type of mobile developer which Microsoft was hoping to court.

I've been thinking for some time that Microsoft should adopt Swift, the language Apple developed for iOS, then open-sourced. Microsoft are probably thinking But we've got C#, loved by all who use it. We don't need Apple's attempt at C#.

Oh, but you do, Microsoft. Now more than ever.

…and Microsoft's intention

You see, Microsoft's intention behind buying Xamarin is that those developers currently developing apps for iOS (developed using Swift) and Android (developed using Java) will now see that they can use a single development environment and develop for both simultaneously using C# and Xamarin tools.

And one can understand why Microsoft expected this to happen.

Visual Studio featuring Xamarin's development tools

Visual Studio featuring Xamarin's development tools - Microsoft's strategy for wooing iOS and Android developers. Image from blog.xamarin.com

But aside from the fact that iOS developers actually really like Swift and probably don't want to learn yet another language so soon after learning Swift, The Next Web is now reporting that Google are investigating whether to make Swift a 'first class' language for Android.

In other words, should Android's parents allow their legion of developers to build Android apps using the same language in which they write iOS apps.

And to be clear, Swift is not a language which Xamarin - or Visual Studio in general - supports. Compiling Swift to run on the .NET Framework is kind of technically possible, but I'm suggesting full, native support from within Visual Studio.

Apple's Swift programming language

Apple's goals for Swift are very reminiscent of Microsoft's intentions with Xamarin as well as the Universal Windows Platform (UWP). Image from udemy.com

Now, iOS apps and Android apps are different beasts; it's not as if using the same language means that the app can be shared across both platforms. But it does mean that a lot of the code can be shared and, with good software development practices like dependency injection the platform-specific aspects can be easily slotted into a shared codebase.

A need to save face?

That this comes so soon after Microsoft's Xamarin announcement is probably no coincidence, but taking that aside, it's easy to understand the advantages of Google doing this.

Microsoft might be against this idea because it would appear to undermine their faith in their own language, but this is the same company who's been offering better apps for competing platforms (iOS and Android) than for their own (Windows Phone / Windows 10 Mobile), so what's the harm if they include an option in Visual Studio - acknowledged as the best Integrated Development Environment (IDE) in which to write code for someone else's language?

Furthermore, Visual Studio already supports at least one widely-used language which wasn't developed by Microsoft - Python. And while you can use Visual Studio to write Python in a standard, default way, as with every other Python IDE, you can also use Visual Studio to develop in IronPython, Microsoft's implementation of Python which runs on the .NET Framework.

So why not do the same with Swift?

An Enticing Technical Prospect

To get a little technical, Swift would need a runtime environment, just like Java, which runs on the Java Runtime Environment, and just like Microsoft's own C#, which runs on the .NET Framework.

But consider this: Google are currently going through a protracted legal process with Java's owners, Oracle, about their fair use of Java. So… Google might be open to the idea of an alternative runtime environment on which to run Android.

A few years ago, for an interesting project, Xamarin - yes, the same people Microsoft recently bought - ported Android to run not on Java but on Mono, an open-sourced implementation of the .NET Framework. The results were eye-opening: the Mono implementation of Android ran considerably faster, in some cases around 10x faster.

The results of Xamarin's 2012 investigation into a .NET-managed Android

The results of Xamarin's 2012 investigation into how well Android could run on the .NET Framework over the Dalvik (Java) runtime. Image from blog.xamarin.com

What does this mean for Microsoft?

Well, I'm sure Google are aware of Xamarin's little experiment from a few years ago. Which leaves me wondering, if Microsoft were to adopt Swift and offer it inside Visual Studio, permitting developers to write Swift both for its current runtime and the .NET Framework, and if Google were to adopt Swift as a first-class language…

…would it be a great stretch of the imagination for Google to consider moving Android from Java to the .NET Framework if Swift were recognised by both parties?

A common development language used by all the mobile platforms, and two of the mobile platforms (if Windows 10 Mobile has a future) running on the same runtime environment - this would move things a lot closer to what developers want in order to easily share code and thereby apps across platforms. Wouldn't this be a win-win?

Leaving Microsoft in the cold

But either way, this rumour that Google are considering making Swift a first-class language under Android could be another nail in the coffin for Microsoft's beleaguered mobile platform, and is something Microsoft should have already considered.

Apparently Microsoft have considered it, but this rumour is almost a year old without being updated.

As The Next Web reports, Swift use is booming. Microsoft's Xamarin initiative was to get other developers onboard, developers who had perhaps not thought about using Visual Studio to develop iOS or Android apps. If Swift were to overtake the likes of Java in the developer popularity stakes then Microsoft would be further seen as the anachronistic outlier.