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

Kotlin > 🏝 (Kotlin: more than an island)

Kotlin > 🏝 (Kotlin: more than an island)

2017-07-15: MobileOptimized 2017
2017-05-31: https://www.meetup.com/GDG-Berlin-Android/events/238173227

The last Google I/O was probably the most exciting ever, especially for one reason: Kotlin received official recognition as a first-class citizen on Android.
The quantity of developers cheering for this shouldn't come as a surprise, as some of them have already been using the language for years, and for good reasons.
Join us to understand what Kotlin really is, and witness how its principles and advanced features make it so unique today, plus what will make it transcend into something even more powerful in the future.

Animated slides (Keynote): https://goo.gl/QfQLdp

Eugenio Marletti

May 31, 2017
Tweet

More Decks by Eugenio Marletti

Other Decks in Technology

Transcript

  1. !

  2. fun main(args: Array<String>) { val nullable: String? = null val

    alternative = nullable ?: "¯\_(ϑ)_/¯" val lengthOrNull = nullable?.length if (nullable != null) { println(nullable.length) } } }
  3. abstract class NetworkResult { object Cancelled : NetworkResult() data class

    Success(val json: String) : NetworkResult() data class Error(val error: Throwable) : NetworkResult() } fun test(result : NetworkResult) = when (result) { NetworkResult.Cancelled -> null is NetworkResult.Success -> result.json is NetworkResult.Error -> throw result.error else -> error("WTF") }
  4. sealed object Cancelled : NetworkResult() data class Success(val json: String)

    : NetworkResult() data class Error(val error: Throwable) : NetworkResult() } fun test(result : NetworkResult) = when (result) { NetworkResult.Cancelled -> null is NetworkResult.Success -> result.json is NetworkResult.Error -> throw result.error class NetworkResult { }
  5. high level abstractions, enforced by the compiler extend the language

    through DSL built in symbiosis with tools moving fast, but carefully change of mindset
  6. Official website goo.gl/xL99fk Kotlin and Android (blog) goo.gl/FQYAcW Introduction to

    Kotlin (video) goo.gl/3n6wic Life is Great and Everything Will Be Ok, Kotlin is Here (video) goo.gl/NTaYqi Using Project Kotlin for Android (doc) goo.gl/T0SDTJ The Future of Kotlin (video) goo.gl/INLPDl Kotlin 1.1 (video) goo.gl/iKojmn
  7. BIT .LY /KO TLIN -M O RE -TH A N

    -A N -ISLA N D Eugenio Marletti @workingkills