Slashdot Mirror


Android Now Supports the Kotlin Programming Language (venturebeat.com)

In addition to Java and C++, Google announced at its I/O 2017 conference today that Android is gaining official support for the Kotlin programming language. VentureBeat reports: Kotlin is developed by JetBrains, the same people who created IntelliJ. Google describes Kotlin, which is an open sourced project under the Apache 2.0 license, as "a brilliantly designed, mature language that we believe will make Android development faster and more fun." The company notes that some have already adopted the programming language for their production apps, including Expedia, Flipboard, Pinterest, and Square. There are already many enthusiastic Kotlin developers for Android, and the company says it is simply listening to what the community wants. But Google's choice didn't just come down to the team believing Kotlin will make writing Android apps easier. Developers will be happy to know that Kotlin's compiler emits Java byte-code. Kotlin can call Java, and Java can call Kotlin. Indeed, "the effortless interoperation between the two languages" was a large part of Kotlin's appeal to the Android team. This means you can add as little or as much Kotlin into your existing codebase as you want, mixing the two languages freely within the same project. Calling out to Kotlin code from Java code should just work, while calling to Java code requires some automatically applied translation conventions.

11 of 91 comments (clear)

  1. Obligatory by Anonymous Coward · · Score: 2, Insightful

    New week, new language-of-the-week.

    Fucking millennials can't use languages that have worked for decades because "it's old".

    Idiots.

    1. Re:Obligatory by ShanghaiBill · · Score: 2, Insightful

      Also, their claim to be "listening to what the community wants" is bullcrap. What people want is a language that can run on Android, iOS, and desktop. Currently, the only language that can do that is Javascript, which sucks.

    2. Re:Obligatory by OzPeter · · Score: 4, Insightful

      Also, their claim to be "listening to what the community wants" is bullcrap. What people want is a language that can run on Android, iOS, and desktop. Currently, the only language that can do that is Javascript, which sucks.

      There's this company you may have heard of called Microsoft. It's got this program called Visual Studio that you can use to write programs in a language called C#. It has this crazy feature where you can write one version of code and deploy it on iOS, Android, and Windows. Maybe you should check it out someday?

      --
      I am Slashdot. Are you Slashdot as well?
    3. Re:Obligatory by Snotnose · · Score: 2

      It's not millenials, this has been going on for a long time. Used to be a magazine called Computer Languages, which was all about new computer languages (duh).

      Keep in mind, at one point C, C++, Java, Javascript, D, whatever were hot new languages.

    4. Re:Obligatory by DontBeAMoran · · Score: 2

      He said "desktop", not "Windows".

      Give me something that can target Android, iOS, Windows, macOS and Linux.

      --
      #DeleteFacebook
    5. Re:Obligatory by niff · · Score: 2

      Xamarin lets you cross-compile when needed, but you cannot link or directly call Xamarin libraries from Java or Objective-C applications.

      That's a show stopper for us, because it means that your C# lives entirely in its own universe, without being able to interact properly with other libraries and services.

      In my experience, locking yourself into Xamarin works out great for small applications. In the same way that Dreamweaver worked great to design simple web pages. It's fast and brilliant, and it doesn't require you to learn about platform details.

      It looks like a productivity booster at first, but when you become more serious you'll run into annoying problems that cost more than maintaining two code bases.

  2. Isn't this Ruby?! by wanchic · · Score: 2

    This looks an awful lot like ruby. Can someone show me the differences?

  3. Re:Never heard of it. by __aaclcg7560 · · Score: 4, Funny

    NEXT OS is dead. Sorry you didn't get the memo sooner.

  4. Bad examples not encouraging by Anonymous Coward · · Score: 2, Interesting

    So I click the first link "concise" and it shows me how to make a singleton. I thought singletons have basically been declared to be an anti-pattern. They're basically a name for an obfusticated global and make testing difficult.

    Not very inspiring to see a bad example as the first introduction to the language. It doesn't give much confidence that the team making the language actually gets bets practices.

    1. Re: Bad examples not encouraging by Zero__Kelvin · · Score: 2

      No. Singletons are not an anti-Pattern, and are not the same as Globals. They implement encapsulation and enforce an interface. This means when you change the singleton your code doesn't break because you didn't hunt down every instance where the global is manipulated and make sure it manipulates it the newly defined and implemented way. That's just one difference.

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
  5. Re:Kotlin is like Swift by SoftwareArtist · · Score: 4, Informative

    I assumed you just meant it was "like" Swift in having similar features. But I started looking at some examples, and it's way beyond that. It practically IS Swift! I found a page comparing the two. Aside from some minor syntax differences, you could practically swap one for the other.

    --
    "I'm too busy to research this and form an educated opinion, but I do have time to tell everyone my uninformed opinion."