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

Introduction to Kotlin/Native

Alec Strong
January 29, 2018

Introduction to Kotlin/Native

A short talk introducing Kotlin/Native, how and why it's used and where it might fit in Android Development.

Video to come

Alec Strong

January 29, 2018
Tweet

More Decks by Alec Strong

Other Decks in Technology

Transcript

  1. package com.sample import java.util.ArrayList object Main { @JvmStatic fun main(args:

    Array<String>) { val names = ArrayList<String>() names.add("Shawn") names.add("Matt") names.add("Alec") names.add("James") names.add("Egor") names.forEach(System.out::println) } }
  2. Front End .kotlin Middle End IR Back End IR .kexe

    … Kotlin/Native Compiler Konan LLVM
  3. import java.util.ArrayList object Main { @JvmStatic fun main(args: Array<String>) {

    val names = ArrayList<String>() names.add("Shawn") names.add("Matt") names.add("Alec") names.add("James") names.add("Egor") names.forEach(System.out::println) } }
  4. import java.util.ArrayList object Main { @JvmStatic fun main(args: Array<String>) {

    val names = ArrayList<String>() names.add("Shawn") names.add("Matt") names.add("Alec") names.add("James") names.add("Egor") names.forEach(System.out::println) } }
  5. import java.util.ArrayList object Main { @JvmStatic fun main(args: Array<String>) {

    val names = ArrayList<String>() names.add("Shawn") names.add("Matt") names.add("Alec") names.add("James") names.add("Egor") names.forEach(System.out::println) }A }
  6. fun main(args: Array<String>) { val names = ArrayList<String>() names.add("Shawn") names.add("Matt")

    names.add("Alec") names.add("James") names.add("Egor") names.forEach(::println) }A
  7. konanArtifacts { program('foo') // executable 'foo' library('bar') // library 'bar'

    bitcode('baz') // bitcode file 'baz' interop('qux') // interoperability dynamic('quux') // dynamic library frameworkA('quuux')A//AObjective-C }A
  8. iOS

  9. • No swift header support • Enums • Generics •

    Value Types • Garbage Collection