Grokking Android

Getting Down to the Nitty Gritty of Android Development

About Cyril Mottier’s “Shaping the Future of Android With Dart” – Some Additional Thoughts

By 8 Comments

This post is inspired by Cyril Mottier's post about Dart for Android. If you haven't read it already, please read it first.

Mostly I think Cyril's arguments are valid.

I wouldn't object to another language besides Java. Especially since the ability to use the new features of Java 8 might still be far away on Android.

But what about Scala, Groovy or the like, you might ask. Well, I think Dart being a first class, Google supported citizen would be another matter altogether. Despite the fact that I agree mostly with Cyril's post, I think the post needs some kind of reply. And as much as I love Google plus, I think it's not the appropriate forum for my reply. So I stick to my old-fashioned blog - with it's even more old-fashioned look 🙂

I do not know whether Dart is a superb language. I only have had quick perfunctory glances on slides or the odd look at the dartlang.org website whenever the topic Dart crept up. I also missed the Google Dart flight school this winter and haven't develop anything decent in Dart at all. Yet from what I've read it looks like a decent enough and modern language that I would like to dig into. So Google bringing it to Android? That would be a very good reason for me to finally have a deeper look 🙂

What's important: Whatever Google comes up with, I strongly believe it's going to run on ART. I wouldn't be too surprised to learn that the initial reason to create a new VM in the first place, was inspired by Google's wish to support other languages better. But as everything in this post, that's just mere speculation. Pure guesswork.

There is a big reason for this: It's the easiest path to migration. It allows people to keep using existing libraries (no matter whether those are plain old Java libraries or specific Android library projects). If those libraries couldn't be used anymore, any other language would have a very difficult start.

It might also allow different teams of bigger organizations (think Facebook, Twitter, or those over-careful and very slow-movers like banks and insurances) to use both languages for one app (or app family). The hip front end team already uses Dart while those taking care of the database, synchronization and what not, keep using Java (for the time being). Cyril left this one very vague. I can't understand why? For me that's a necessity. Without it there's no successful path to a quick adoption.

If there is one thing, where I didn't agree with Cyril, it's his paragraph, where he suggests that Dart could be the one language for all of Google's projects. Such that Google could get rid of Python, Java, C++ and whatever else they use. I don't think that's feasible. For two reasons:

  1. The question of existing libraries exists for Google projects as well. Of course Google could reinvent the wheel all the time - they have enough people to do so. But that would be a foolish waste of energy. I don't think it's likely that Google is going to do that.
  2. One language is rarely suited for all kind of development efforts. That was never true for Java, has never been true for C and probably is not true for Dart as well. For one it's a VM language again. So whenever Google used C or C++ instead of Java or anything else, they will continue to do so instead of using Dart. And there's also the matter of the existing code base and libraries only in use within Google itself. Maybe my knowledge of Dart is too superficial to see how to do that efficiently with Dart. So that reason might not be valid at all. But my guess is, that it is.

And don't forget to star issue 19266 if you want to see Dart on Android.

One last thing: Generally speaking: I hate speculations. So me taking part at a speculative rumour mill, is a big exception. Let me know if you like this kind of post. And of course, what you think about this topic. I'm interested in what you've got to say. Am I totally off? Does this sound reasonable? Is it worth speculating at all?

Wolfram Rittmeyer lives in Germany and has been developing with Java for many years.

He has been interested in Android for quite a while and has been blogging about all kind of topics around Android.

You can find him on Google+ and Twitter.

8 thoughts on “About Cyril Mottier’s “Shaping the Future of Android With Dart” – Some Additional Thoughts”

  1. I agree with your assessment. Also – on the topic of Dart turning into the one language to rule them all – I agree with you that this is not likely to happen. Let’s not forget that even if Google were to wish to have some control over the language they use for systems programming or server side programming, they still have Go language which might be better suited than Dart for whole classes of use cases.

    But that too is too far down the road – As you reasoned, why would Google discard existing libraries an waste resources re-inventing the wheel?

  2. I was thinking a lot about the post Android era in the past weeks. Dart was always my first guess. It’s designed for the post Javascript era. Replacing Java could be another goal.

    I wrote some simple samples in Dart and it’s very easy to learn. So why not.

    Dart wont replace Java in the next 2 years. But Google hasn’t stopped developing it. It’s clear that Dart is the long term goal.

    Let’s wait for I/O 2015!

    1. Wolfram Rittmeyer

      I think Google is pushing Dart pretty hard. After all, they had the Dart Flight School events in February. So there might be some interesting Dart related stuff at this year’s IO as well. Whether it’s related to Android – that remains to be seen.

      I’m always open to learning something new – but I prefer real world practical application as a motivation. So that’s why I would like to see it happening on Android 🙂 Some nice web idea would also be fine, though.

  3. Karthik prasad

    Hi I would love to see more frequent posts from you. I’ve gone through many of your articles and they were very informative. I would even love to see some small tips and tricks and also links to some third party libraries for Android that you thought were interesting.

    Coming to Dart, It’s been 10months since this article and I havent heard much from Google about making this the defacto language. Can you offer some insight?

    1. Wolfram Rittmeyer

      Oh dear. You’re absolutely right! Yes, I also would like to see more posts 🙂 I have some ideas for very short ones – but that’s about it. But having a family and lots to do isn’t helping. Though I can’t complain about either of it, my blog suffers from that.

      Not sure about libraries anymore. I once started this post an introduction to Crouton and intended to keep going on. That was back when the state of libraries on Android was way worse than it is now. Nowadays there’s an abundance of libraries. Not sure what to do. Do you think me just mentioning libraries that I made use of lately and how I benefitted from them would be of use to you (or other readers)? Not sure about that.

      About Dart: I thought this to be a never-will-happen lately. But then out of the blue Neil Davies posted about a renewed effort. So maybe there’s some hope. If so, I hopefully will be able to post something about it in the future.

      Thanks for your input. If it’s any comfort to you: I have not given up on this blog. I just need to find a way to get it in sync with my time constraints.

      1. Karthik Prasad

        Hi,
        Being an amateur Android Developer, I am always looking to learn new things. So yes, I would love to hear about what libraries you used and where it was useful. Even small posts would be very informative.

        That video was nice. I’m excited to see what comes from this.

        Also I would love to reach out to you and email and talk with you.I would love to pick your brain and learn from you.

  4. I dont think android development is java development as far as game development is not C++ development. I mean, the introduction of a different language wont change android framework or android programming technics or paths. The language choosen is not relevant at the end of the day as far as you know it ofc.
    So why change a well known and supported language for other new? It makes no sense for me.

    Ios and apple are totally different architecture, closer to c++ or closer to machine level, so maybe they have some reason to do that kind of thing. But even then apple changed a propietary language for a new propietary language.

    Makes no sense for google and android.

    1. Basically during the evolution of programming languages we tend to change languages if we think newer languages offer simpler solutions than previous ones.

      This of course is at first only the view of the creator(s) of the new language. And all too often it turns out, that the improvements are too minimal to justify a change for most developers. That’s why not many languages actually get a big following. But even then – if this language proves to be better for certain types of development, than that is reason enough to change languages for this particular type of development.

      That something is well known and well-supported is not necessarily a reason to stick to it in itself. Even though it obviously has benefits (hiring, quicker understanding, more SO answers, easier Googling…). But if something other language offers benefits – significant benefits – over what we have, why not change it?

      You refer to Apple’s switch from Objective-C to Swift. Most iOS devs surely would say, that this makes a big difference and helps them write better code faster. I think Dart, Kotlin and to some extent Java 8 might give us that as well. Alas, unless Google backs it fully, it will remain marginal. Which is bad for us all.

Leave a Reply

Your email address will not be published. Required fields are marked *