back to article Kotlin's killin' Java among Android devs

Java on Android is dying, and before long will be dominated by Kotlin, or so says a selective slice of developer data. Realm, which offers a real-time database popular among mobile application makers, has crunched the numbers from its pool or 100,000 or so active developers. The company on Tuesday published its findings, a …

  1. thames
    Facepalm

    The law of unintended consquences

    Oracle: Grrrr! Stop using Java without paying us or we'll sue you!

    Google: - OK, we'll stop using Java.

    Oracle: - Uh, wait a minute, let me rephrase that!

    1. TVU Silver badge

      Re: The law of unintended consquences

      "The law of unintended consquences

      Oracle: Grrrr! Stop using Java without paying us or we'll sue you!

      Google: - OK, we'll stop using Java.

      Oracle: - Uh, wait a minute, let me rephrase that!"

      This is entirely Oracle's fault for being overly litigious in respect of Java APIs and they only have themselves to blame. The good thing about Kotlin is that it's covered by an Apache 2 free software licence and Oracle's not involved either so the potential for legal actions is much reduced.

      1. Ian Michael Gumby
        Boffin

        Re: The law of unintended consquences

        Meh!

        I'd say learn Scala..

  2. This post has been deleted by its author

    1. thames

      Re: Android & Java

      Based on what I've read about the market rather than projecting my own prejudices:

      - Java is the most widely used language for Android development. It is/was the officially supported general purpose language and the official documentation and support assumed you were using it.

      - C++ is used for some games, particularly ones that were meant to be cross-platform with Apple phones. However, many of these applications would do the heavy duty logic and control in C++ but use Java for the UI.

      - C# is used for some games, particularly games that are written for the Unity game engine. The main reason for using it was familiarity existing game programmers had. There's a limited market for this though, as many new game developers started on mobile platforms and didn't carry PC baggage with them. There is also some use of C# for corporate applications which are developed internally by people whose background is C# only. That's also a limited market due to a lot of this work being outsourced to consultants.

      - PhoneGap/Cordova is HTML, CSS, and Javascript bundled up and made into a self standing app (not a web site). It is very widely used for simple apps which need to be cranked out quickly on a budget.

      - Various other languages - these come and go and are difficult to categorise.

      There are some news stories that compare market share for cross platform development, but since most mobile development isn't cross platform they don't actually tell you much that is useful.

      So it appears that Java has been the default language that Android developers use. Anything else is limited to specific market niches. If you work in a specific niche however, you may find a particular niche language widely used there.

      The main problem with using one of the niche languages is that things like documentation, support, and bug fixes are harder to come by than when using the "official" language.

      Kotlin is supposed to take over from Java as the main default language. I haven't used it so I can't comment on its prospects there.

      1. This post has been deleted by its author

        1. handleoclast

          Re: Android & Java

          Java could well be the most popular language for Android development.

          For some values of "popular."

          "Popular" meaning "used by most apps, even if only as a wrapper around the UI and with the bulk of the work being done in a less shitty language" - almost certainly.

          "Popular" meaning "used as the only language to write most apps" - probably not.

          "Popular" meaning that most app writers think "This is a wonderful language, I love it, I can't get enough of it, I even dream in it" - no fucking way.

          Many people enjoy drinking beer but do not particularly enjoy urinating, even though one invariably leads to the other and are thus equally "popular" as the term is used in the original post. Few people, in my experience, say "Fancy going out for a piss?"

          Popular does not equate to enjoyable unless one has freedom of choice in the matter. In this case, you have no choice but to use a little Java in wrappers even if you hate having to do so.

    2. bombastic bob Silver badge
      Coffee/keyboard

      Re: Android & Java

      "vast majority of Android apps out there are written in either C# or C++"

      C++ sounds fine, but C-pound? EEEEeeeeewwwwwwwwww!!!!!!!!!!

      /me can't find a vomit icon. I'll use this instead.

  3. Anonymous Coward
    Happy

    Thank Allah, Thank Buddha, Thank Jehovah

    Finally, I can shake off that crusty, old, stale, waffly language Java.

    Java's problems started with Sun's demise, the language has lagged behind other languages such as C#.

    I've not used Kotlin in anger yet, but it looks very much like Swift and I look forward to coding with it*

    * I might give it a few months to allow StackOverflow to fill up, so I can copy and paste ;)

    1. Anonymous Coward
      Anonymous Coward

      Re: Thank Allah, Thank Buddha, Thank Jehovah

      "Java's problems started with Sun's demise"

      Surely they started with Java's existence?! It has continually had stratospheric vulnerability levels. Coexistence and updates are a nightmare. It doesn't perform well versus the competition and has major garbage collection issues. It's just a total pos and it's demise can't come fast enough!

    2. bombastic bob Silver badge
      Thumb Down

      Re: Thank Allah, Thank Buddha, Thank Jehovah

      "he language has lagged behind other languages such as C#."

      that comparison to C-pound [the language that makes me want to VOMIT] earned you a DOWN vote.

  4. Anonymous Coward
    Anonymous Coward

    Could've sworn this was up the other day.

    1. LosD

      It was, then it was pulled again, and all comments deleted, for some reason.

      1. diodesign (Written by Reg staff) Silver badge

        Re: article deja vu

        We accidentally ran it too early - it was supposed to go live Tuesday after the Columbus Day break. My fault.

        C.

  5. LosD
    Coat

    Kotlin is much like Scala, just without the shitty parts... Whiiiich I guess makes Kotlin nothing like Scala.

  6. Anonymous Coward
    Anonymous Coward

    I wonder if it matters any more

    I wonder if it matters any more, in the sense that it's been a long time since I heard of a significant use of a computing platform that was only possible because the developer(s) picked a specific language. (And for sticklers, let's ignore the obvious response that any Turing-complete language can do anything...)

    I could write something like Angry Birds in C, or Java, or C#, and they would all be painful and pleasant in their own unique ways. Is Kotlin essentially just a better (slightly more productive) version of that? Or is it a massively more productive version (cf Fortran vs assembler circa 1960)? Or does it enable me to do things that are practically impossible in the others?

    1. Anonymous Coward
      Anonymous Coward

      Re: I wonder if it matters any more

      Kotlin is Java with some of the sharp edges removed. For example it's null safe and auto-casts.

      In return you've got to put up with its half-baked functional model, which is like Scala but nowhere near as expressive or flexible. This may not be a bad thing as it means people can't just implement a DSL that functions purely on implicits and black magic.

      But yeah, hardly a sea-change.

      The thing you've got to remember though is most Android "Java" developers were until very, very recently stuck on a positively ancient version of the language (i.e. 6), which is painful to work in and is missing many of the newer innovations of 7/8/9. So for an Android Java dev Kotlin must look like mana from heaven.

  7. g00se
    WTF?

    Open source

    Kotlin, an open source language

    What would a closed source language be? Just asking...

    1. Anonymous Coward
      Anonymous Coward

      Re: Open source

      You'd be surprised. First off anything that lives in a niche, tied to a vendor product is almost certainly a closed source language. This is especially the case in the enterprise analytics space. Think of your Matlabs, your SASes, your SQLs, your godforsaken crosses between SQL and procedural. Then you've got your commercial C/C++ variants (hello MSVC!). Let's not even get started on the likes of Apex.

      Closed source programming: surprisingly common.

      1. Bronek Kozicki

        Re: Open source

        ABAP , T-SQL as two of many examples. Basically as a programmer you are given access to language documentation, programming, and runtime environment, but you cannot peak underneath and are not allowed to influence its future evolution.

      2. Anonymous Coward
        Anonymous Coward

        Re: Open source

        And as a strange corollary, Oracle's APEX (Application Express) nonsense is a framework to code webapps in PL/SQL!

    2. bombastic bob Silver badge
      Meh

      Re: Open source

      "What would a closed source language be?"

      In some ways, Java. but only because Oracle owns everything about it, and dictates what people can do to it. But there's OpenJDK, so it's not entirely "closed". You do not have to use Oracle's JVM or JDK.

      That being said, the only thing I really hate about Java is the LACK of "unsigned integer" types. Yeah. They arrogantly leave that out, deliberately. It makes certain things *difficult* in Java. but when you're doing device control, or reading binary data from a device with 64-bit unsigned integers and bit flags to go with them, it becomes a bit tedious, ya know?

      yeah, rather short-sighted of them, isn't it?

      I only use Java for 'droid anyway, and only because it's easier at the moment...

  8. Kevin McMurtrie Silver badge

    Shorter, slower

    I'd argue that most of the bloat in Java 8 comes from traditions of anti-patterns and bad/buggy Checkstyle rules. What's really being discarded are bloated coding patterns. I wouldn't be surprised if Kotlin's helpful attempts to further reduce bloat are undone by new anti-patterns.

    In scanned through the Kotlin documentation and noticed that it's moving more towards immutable objects and the elimination of primitives. That's a nice option, but enforcing that in CPU sensitive code destroys performance. Making tight processing loops 100x to 1000x slower on a mobile device is a bad idea.

  9. Amorous Cowherder
    Stop

    Doesn't Kotlin rely on Java?

    I thought Kotlin had a very heavy reliance on the underlying core Java class libraries, at least that's what I heard/read a while back. If so then sadly Java and Oracle are going nowhere, all you get is less need to learn direct Java coding but you will still need to know what's happening under the hood.

    1. Kevin McMurtrie Silver badge

      Re: Doesn't Kotlin rely on Java?

      It's using the Java 8 JVM so Java is still there. You can be running a Python front-end on the JVM and still access Java objects, though they don't behave well due to the different base class architecture.

  10. Tom 38
    Mushroom

    Cool, another Java scripting language

    So I write my Android app in Kotlin, Jenkins can run CI tests on it using Groovy, the analytics are generated by Pig using Scala, and all the servers are deployed using Puppet (Clojure)?

    Fucking Java.

  11. MT Field
    WTF?

    Can anyone enlighten me

    People talk about Java being a programming language, but I thought it was defined as a virtual machine or set of runtime libraries (or some modern combination of those)?

    1. Anonymous Coward
      Anonymous Coward

      Re: Can anyone enlighten me

      It's all of those things. A set of language specifications, a language, a set of runtime specifications, a set of runtimes, a virtual machine specification and a set of virtual machines.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Other stories you might like