Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Kotlin is here to stay

Kotlin is here to stay

Let's take a look back at the past year. Do you have the luxury to skip Kotlin? It's up to you to decide, but before that, let me show you basic and cool stuff Kotlin brings.

Bajic Dusko

March 24, 2018
Tweet

More Decks by Bajic Dusko

Other Decks in Programming

Transcript

  1. A long time ago in a galaxy far, far away....

    • 2011 - JetBrains unveiled Project Kotlin. Named by a lake near St. Petersburg • 2012 - Open sourced under Apache 2 license • Widely accepted in Android development community • 2016 - v1.0 released • May 2017 - First class support for Android by Google • December 2017 - v.1.2 deployed • Skyrockets
  2. Android P Source: android-developers.googleblog.com Kotlin is a first-class language on

    Android, and if you haven't tried it yet, you should! 
 We've made an enduring commitment to Kotlin in Android and continue to expand support including optimizing the performance of Kotlin code. 
 In P you'll see the first results of this work -- we've improved several compiler optimizations, especially those that target loops, to extract better performance. 
 We're also continuing to work in partnership with JetBrains to optimize Kotlin's generated code. You can get all of the latest Kotlin performance improvements just by keeping Android Studio's Kotlin plugin up-to-date.
  3. Android is a Kotlin's driving force • Out of the

    box support in Android Studio • Kotlin Android Extensions by JetBrains • Android KTX by Google but everyones benefit
  4. Ok, but why Kotlin ? • Faster development and more

    fun • Total IDE support in IntelliJ (Android Studio) • You don't have to choose between Java and Kotlin. Use 'em together. • Use it with C++. JNI is fully supported. • All Android versions support Kotlin. JDK6 -> today • 100% interoperable with Java, use any Java library you'd like to • Google and JetBrains partnered on this. Say no more! • Awesome docs. Even android documentation is switching to Kotlin
  5. Yes, that's nice, but.. WHY Kotlin ? • Concise (reduces

    the amount of boilerplate code) • Safer (NullPointerException.. what's that !?) • 100% interoperable with JVM • Use all existing libraries from JVM and Android (in a Kotlin way) • IDE of your choice or do it from a Command Line • Did you know that Android devs are limited to JDK7 (8ish). Yup, that's true. • Functional programming
  6. What about the !Android stuff? • KotlinJS - Can be

    transpiled to JavaScript (targeting EcmaScript 5.1) • Can be used for backend development (Spring 5, Vert.x, Ktor, Corda) • Kotlin/Native - Compiling to native binaries (iOS, Embedded targets)