Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Android Java Google Open Source Oracle Programming

Google Pushes Kotlin Over Java for Android Development (thenewstack.io) 117

Google "officially declared Kotlin the go-to language for Android development last week at its Google I/O developer conference," reports Mike Melanson's "This Week in Programming" column, "and the company is backing that up with a couple of initiatives around making it easier (and free) to learn the language now used by a majority of Android developers." Google teamed up with Udacity to offer Developing Android Apps with Kotlin , a free, self-paced online course on how to build Android apps with Jetpack and Kotlin, meant for people who have programming experience and are comfortable with Kotlin basics. Google also announced "Kotlin/Everywhere, a series of community-driven events focussing on the potential of Kotlin on all platforms," which it is putting on in conjunction with JetBrains.

Of course, this leaves the question that has been asked many times before -- why Kotlin? -- and IT consultant Kristen Carter offers a take on how Android app development became Kotlin-first. Carter offers some business angles, such as the 2010 lawsuit against Google by Oracle, which predates Kotlin by just a year, and she speculates may have been the impetus behind the language's development as "Google has always wanted to get away from the [Java] ecosystem." At the same time, Carter offers some language-specific reasoning too, such as the comparably succinct nature of Kotlin, the absence of Java's NullPointerExceptions, and the ease with which Java developers could transition to Kotlin. Carter ends her piece by posing the possibility that Oracle "knows the significance of Java in android app development" and could "ship Java with a few upgrades in its next version to take on Kotlin."

This discussion has been archived. No new comments can be posted.

Google Pushes Kotlin Over Java for Android Development

Comments Filter:
  • WTF is "Kotlin"? (Score:3, Insightful)

    by fbobraga ( 1612783 ) on Saturday May 18, 2019 @10:42AM (#58613828) Homepage
    Never heard about it before...
    • By what I have read e understand, it's just a wrapper around the JVM...
      • That makes as much sense is claiming that C is "just a wrapper around the x86 architecture."
        • From what I'm understanding it appears to be a wrapper in the sense that it is fully interoperable with Java [kotlinlang.org], so that it appears that you can use either syntax in such a project. It reminds me of TypeScript for JavaScript, except that it appears to have its own separate syntax as opposed to just providing syntatic sugar as they say.
      • By what I have read e understand, it's just a wrapper around the JVM...

        The Google byte code and virtual machine are Dalvik. Basically Google had already de-java'd the backside. Now with Kotlin they are de-java'ing the frontside.

    • WTF is "Kotlin"?

      Great minds think alike.

    • If only there was some kind of global network where you could search for such information

  • I use Kotlin (Score:4, Informative)

    by OrangeTide ( 124937 ) on Saturday May 18, 2019 @10:45AM (#58613848) Homepage Journal

    But it's nothing to get excited about. It's not hard to use once you get past a few surprises.

    • Please elaborate these surprises.

    • by HiThere ( 15173 )

      Looking it over it looked quite poor for concurrent programming.

      That said, after the Oracle suits over API documentation, I can sure understand why Google didn't want to have anything to do with anything they have any handle on. And Kotlin is probably the easiest transition away from Java.

      • Looking it over it looked quite poor for concurrent programming.

        You would be correct sir. Kotlin doesn't really solve anything new for Java, it's bad at concurrency. Concurrency is also a bit hard to get right in the JVM, for some definition of "right" (mine). Go is also poor for concurrent programming, but less so. Even though Go tried to be really good at concurrency, it isn't.

        I'd lean more towards Erlang and Elixir if concurrency was my primary concern, especially in a distributed environment. Concurrency almost never is of primary concern in what I do, it's usually

        • by HiThere ( 15173 )

          The trouble with Erlang and Elixir is that they demand all data be immutable. (Well, not really. Each object can have one mutable map, and the database connections aren't immutable, but...)

          I want data to pass between procedures via immutable byte strings, and no externally visible data. This is a nearly incompatible usage.

          Yes, I *could* do it in C or C++, but there's so much programmer overhead that they're impossible. I'm one person, so I need to minimize doing things like writing custom routines to de

          • The trouble with Erlang and Elixir is that they demand all data be immutable.

            I really appreciate this model. There is a lot you can prove statically when this constraint is in place.

            I want data to pass between procedures via immutable byte strings, and no externally visible data. This is a nearly incompatible usage.

            Agreed that what you want to do is essentially incompatible with the model. Passing values to functions rather than references would be what languages like these prefer.

            The advantage is it permits a more general optimization for distributed processing and parallel processing. Disadvantage, it doesn't let you write the program the way you wanted to.

            Yes, I *could* do it in C or C++, but there's so much programmer overhead that they're impossible. I'm one person, so I need to minimize doing things like writing custom routines to determine whether a directory already exists.

            My entire career is built on writing boiler plate and one

      • Looking it over it looked quite poor for concurrent programming.

        Why would this be relevant, given whether its Kotlin or Java, they have to run off of the same JVM? You really expect sophisticated concurrent support built into the front end of a JVM language? Kotlin is not going to be running on mainframes or exotic architectures; its a "working" language for Google's android environment, which are primarily ARM based phones and tablets.

    • Oh, are you?!
  • Comment removed (Score:4, Interesting)

    by account_deleted ( 4530225 ) on Saturday May 18, 2019 @10:46AM (#58613850)
    Comment removed based on user account deletion
    • Nobody likes programming in Java, ...

      I do -- but I'm a little weird.

      (And I'm proficient in 10-15 programming/scripting languages, so liking Java isn't by default.)

      • Me too. Actually I used to have Java, until around Java 11 then I really started liking it for the first time. Kotlin though, I really like C-style syntax a lot, and removing the end semicolons and all that, it's just like people who write JavaScript without semicolons because they aren't required. Look, it's not Ruby, type the fucking semicolons.
      • by phantomfive ( 622387 ) on Saturday May 18, 2019 @11:59AM (#58614176) Journal
        I used to not like Java, but then after switching to Python/JavaScript/Ruby, I really, really miss Java. Simple things, like "rename variable" are an order of magnitude easier in Java because of the strong typing that is lacking elsewhere. If you are working with a team, Java makes it easier.
        • by raynet ( 51803 )

          How can renaming a variable be any easier in Java compared to other programming languages?

          • by kiviQr ( 3443687 )
            Static vs dynamic typing - tools are better when renaming variable. On top of that when you compile you will know right away if you missed something.
          • by phantomfive ( 622387 ) on Saturday May 18, 2019 @03:38PM (#58615112) Journal
            In Java, with a decent IDE, you can right-click on a variable, and select "change name" and it will change every instance of that variable's name. Job done. In a dynamic language, like Python or Ruby, the compiler can't always find every place a variable is used, so such tooling typically doesn't exist.

            This is just one example of a refactor that is made easier by static typing, there are a lot (of more or less usefulness). Rename variable/rename function/rename class are the most useful for me, though.
          • Think about C. By the time you've worked out whether it should be cIntPtrChrWinConstRefHnd or cPtrIntChrWinRefConstHnd you've forgotten why you wanted to rename it.

            • That's Win32 programming. It's not representative of programming in any other language anywhere (except maybe SNOBOL). Every time I see keywords, DWORD, HANDLE, and friends, I head for the hills.

              I'd rather hand-code binary routines for the Dec Alpha than use the Win32 API, but you know, COM had a good concept. Implementation was bad enough to make 99.9% of its users want to burn it, even after M$ built an abstraction layer on top, but the concept was ok.
              BR BTW we need an acronym for Google that is as eff
          • Because strong typing makes refactoring more easy ... a simple search/replace would replace everything.

      • by HiThere ( 15173 )

        I like many things about Java, but not the language as it has developed. I wan unsigned variables. I want structures whose byte alignment I can control and depend one. (No, pack doesn't count.) I want uint64_t integers...which are values, not handles to something. I want to be able to store those integers in structures...call them hash tables, maps, whatever. I want reasonable enumerated values. I want global constants. Etc.

        So the language that I really want is Digital Mars D version 1, with a whole

    • by OYAHHH ( 322809 )

      I love working in Java.

  • Just great (Score:5, Funny)

    by fahrbot-bot ( 874524 ) on Saturday May 18, 2019 @10:46AM (#58613852)

    Google "officially declared Kotlin the go-to language for Android development ...

    After all these years, now they tell us to use GOTOs ... -- geesh, make up your minds already.

  • it's a minor pain right now since half the tutorials are in Java and the other half are in Kotlin (of the non-google ones that is), It's not that hard to adapt the code just a nuisance.
  • by Anonymous Coward

    'Google "officially declared Kotlin the go-to language for Android development last week at its Google I/O developer conference,"'

    Guess I'm behind the times. I thought "Go" was Google's 'Go'-to language

  • Forget Kotlin, it is not worth the time. The Flutter/Dart combination is great.

  • Go (Score:3, Insightful)

    by Billly Gates ( 198444 ) on Saturday May 18, 2019 @02:28PM (#58614828) Journal

    Wait. Whatever happened to go? Wasn't that supposed to be the new Google language

    • Wait. Whatever happened to Dart? Wasn't that supposed to be the new Google language?
      • Wait. Whatever happened to Dart? Wasn't that supposed to be the new Google language?

        It's almost as if different languages are good for different kinds of programming and programming environments.

    • Re:Go (Score:4, Informative)

      by caseih ( 160668 ) on Saturday May 18, 2019 @09:52PM (#58616526)

      Neither Go nor Dart were ever intended for use on Android for app development. Dart was always intended to be used mostly within the browser (transpiling to Javascript mainly), and Go is intended to be a sort of safer systems language. I always saw Dart as more of an experimental language. Go is used internally at Google on their servers in place of C++.

      Kotlin has its own momentum at this point in the Android development space, so adopting it makes quite a lot of sense.

    • by Tablizer ( 95088 )

      Whatever happened to "go"? Wasn't that supposed to be the new Google language?

      Google renamed it to went.

  • Why? Just Why? (Score:5, Insightful)

    by zysus ( 123604 ) on Saturday May 18, 2019 @04:25PM (#58615262) Homepage

    Google seems to have this compulsion to introduce/push new languages and stacks without regard to the serious overall product lifecycle concerns that go along with them.

    As a software engineer (not developer) and team lead, I care about not just the language, but the libraries, run-times and people and tools that go along with them.

    Oracle's absolute IP bullshit aside, which could be solved in any number of creative ways. Kotlin means that I have to retrain my team. Revalidate my tools, compiler and software stack and possibly double my overall dependency foot print if I need any legacy Java inter-op. This also means substantially higher license compliance efforts amongst other things.

    The entire thing has to be seriously compelling to justify the long-term cost. The "programmer productivity" go-to argument just doesn't hold water. Almost every software engineer is taught in school (and it holds in industry in my experience) that initial creation of the software is a small fraction of the overall cost to produce and maintain that software.

    In short, I'm not buying what Google is selling. Especially after the whole Eclipse vs IntelliJ Android Studio switch over debacle.

    • Almost every software engineer is taught in school (and it holds in industry in my experience) that initial creation of the software is a small fraction of the overall cost to produce and maintain that software.

      I wish more people were taught that. It seems to be something people have forgotten.

      • IT chaos is job security. A Grand Truth of the industry is that if our industry streamlined and factored everything, perhaps 2/3 of us would be unemployed. Maybe it's not a conscious decision, but our normal human subconscious biases us toward selfish goals.

        "Shut up and learn rocket science" is heard much more often than, "Hmmm, maybe we over-complicated this." IT is not alone: Warren Buffett likes to rant about similar waste and BS in the financial industry. [columbia.edu]

    • The why is that it is NOT actually Java, for legal reasons.

      But there should be no retraining of teams. It is almost identical.

      The one nice thing it has is keyword named parameters. Just like Visual Basic had decades ago. Sadly, it still does not have properties.

    • by Anonymous Coward

      Kotlin is a first class language in IntelliJ (both made by Jetbrains), the IDE that Android Studio is based on. Eclipse + the Android plug in was a nightmare, and thank goodness Google switched away from that mess. Very few people miss it because it sucked and most competent developers are able to learn a new IDE.

      Kotlin has a number of benefits over Java, including being a far more modern language that still runs on JVM-compatible runtimes. Java libraries are compatible with Kotlin, but the opposite isn't n

    • genuinely interested about the Eclipse vs IntelliJ debacle. I am one of the rare vocal dev that prefer Eclipse over IntelliJ. Sure Android Studio works OK for android dev. I use it everyday, but I still code with Eclipse for my own projects because of incremental compilation, perspectives, problems views etc etc.
    • Kotlin runs on the JVM and interoperates perfectly with Java. You can call any Java library from Kotlin and you can call any Kotlin library from Java. That means you don't need to replace your software stack, and you add very few new dependencies. You probably don't even need to replace most of your tools, because most of them probably already support Kotlin.

      It's also easy to make the switch gradually. You can even mix the two languages in a single project, with some classes written in one and some in t

  • Yes, I know this is probably a Swiss-German inspired naming, but in proper German, the naming is more than unfortunate. Probably adequate though.

  • Class extensions are nice. I haven't seen them since the Smalltalk days.

If you can't get your work done in the first 24 hours, work nights.

Working...