Main image of article Cross-Platform Development: Which Languages and Platforms are Best?

Throughout computing history, your system dictated your software development process. In the personal computing eras of the late 70s and early 80s, if you had a Tandy, you wrote programs for Tandys, Apple II/III for Apple, and so on. There was some crossover, but it took a lot of work to port your software between systems. 

Over the past several years, things have improved, with many companies and developers attempting to create the perfect tools for cross-platform development. Thanks to those efforts, it’s much easier to use the same code on different platforms—Flutter and to a lesser extent C# could be said to be widely cross-platform, as are Java, C++ and Haxe. Let's look at those and see what they can do, and rate how easy it is to write cross-platform code on:

  • Desktop (Windows, Mac OS and Linux)
  • Websites
  • Web Apps
  • Mobile
  • Embedded devices (IoT, automobiles, etc.)

Rating Cross-Platform Ease of Development

I decided to calculate a score out of 100: 10 points for each platform supported with three platforms for desktop, 20 for mobile, and 20 for IoT and automobiles. Plus, a final 10 points for ease of movement between platforms.  

Flutter

Flutter ticks all the boxes for the above platforms other than websites. Flutter for Windows only came out a few months back, and Mac OS/Linux Flutter desktops are still in beta; it's still early days for IoT and automobiles, but BMW now has a 300 Flutter/Dart team and Toyota has been using it for developing infotainment systems. Flutter plays nicely with CarPlay (iOS) since iOS 14, at least in theory.  

Score: 20 for desktop (5 each for Linux and Mac OS), 0 for websites, 10 for web apps, 20 for mobile and another 20 for IoT/Automobile. I rate it 9 out of 10 for ease of cross-platform development. Total: 79/100.

C#

With C# cross-platform, development feels less coherent; it’s more like a bunch of technologies thrown together. Desktop and websites/web apps are the stable options, while mobile feels like a work in progress. I wrote some apps in the early Xamarin days before Microsoft bought it and it produced solid and fast code. Using XAML in WPF desktop and Xamarin Forms/Maui feels like a mistake to me; I’m not a fan. it has a steepish, overly complicated learning curve. 

Score: 30 for desktop, 10 for mobile (5 for each platform), 20 for web sites and apps, 10 for IoT, and 1 out of 10 for cross-platform. Total: 71.

Java 

Once very popular for desktop and web; but according to w3techs, only four percent of all websites are now powered by Java. Desktop use has declined for years, and mobile is limited to Android where it's been under pressure from Kotlin.  

Score: 15 for desktop, 5 for mobile, 5 for web sites and apps, 10 for IoT, and 10 for cross-platform. Total: 45. 

C++

C and C++ were the first cross-platform languages, but didn't make it into the web and mobile world. Surprisingly Microsoft includes mobile development in C++ in Visual Studio but I’ve never heard of anyone developing with it. 

Also, writing C++ for desktop development is an exercise in masochism. It went into decline around the millennium, although there are a few older applications like MS Office, Adobe's Creative Suite and various browsers written with it. C++'s strengths are in developing software like operating systems, compilers, database engines and game engines and servers. 

Score: 30 for desktop, 1 for mobile, 1 for web sites and apps, 10 for IoT, and 1 out of 10 for cross-platform. Total: 43. 

Haxe

Haxe has been around since 2005 but isn't that widely known. It isn't listed in the TIOBE Index top 50. Haxe is open-source and code written in it can be compiled into JavaScript, C++, Java, JVM, PHP, C#, Python, Lua and Node.js. It originally supported Flash and still does so for the OpenFl platform. 

There is a list of companies that use Haxe, and this is probably because of its Flash capabilities.  

Score: 30 for desktop, 10 for mobile, 20 for web sites and apps, 0 for IoT, and 10 out of 10 for cross-platform. Total: 70.

Conclusion

There is no perfect programming language that supports all platforms but Flutter, C# and Haxe are among the best.