It’s time: Bring Dart to Android
As one of the first users of Google’s Dart language, I always felt like it could do more than “just some webtricks”. It’s performance is great and the language itself is elegant and modern. I like it. Even more than Java’ which I used for a long, long time. Even more than PHP’ which I used since I started with web programming. Even more than JavaScript, with which I am happy to work with.
Dart is great, but the browser vendors didn’t ask for it. Nor did the hardcore JavaScript users. It is and will continue to be hard for Google to convince other people to switch from JavaScript.
Sure, you can do a lot of great stuff with Dart; like server side programming. But JavaScript has that all too. So why bother?
I always thought there was only one chance for Google to convince programmers of Dart: bring it to Android, and replace the old fashioned Java.
Don’t get me wrong: I still think Java is a great language. But it’s not a great language for all requirements.
When I started with working on my own products, I used Java. It’s something which I regret today, because as a single-man show, it was simply too time consuming. For newer products I use dynamic languages. I am quicker, and that’s what I need right now.
In Android-land, people started to bypass Java and work with Apache Cordova (repackaged as Phonegap).
And just recently, Apple announced Swift. A language which looks pretty similar to Dart actually, as you can see here:
class Shape { var numberOfSides = 0 func simpleDescription() -> String { return "A shape with \(numberOfSides) sides." } }
You see the “var” declaration?
You can also code more in the functional way:
func lessThanTen(number: Int) -> Bool { return number < 10 }
Also interesting: Generics:
enum OptionalValue<T> { case None case Some(T) }
As with Dart, Swift seems to take modern concepts and paradigmas and still looks like a dynamic and lightweight language.
Swift will run on iOS and it’s said to be perfect for game programming. Something which can also be done with Dart.
Now with Apple having a great, nice-looking and easy-to-use language like Swift ready for programmers, I think it’s now the perfect time to bring Dart to Android. I am honest: being a long time Java developer, I will not miss Java that much.
Time to move on, Google! Give us Android-Dart!
Reference: | It’s time: Bring Dart to Android from our JCG partner Christian Grobmeier at the PHP und Java Entwickler blog. |