Pro Yearly is on sale from $80 to $50! »

The Basic Kotlin

The Basic Kotlin

GDG DevFest Incheon 2017
http://devfest17in.gdg.kr

354271902cd8ba2762d05b251dfa0f84?s=128

pluulove (노현석)

October 21, 2017
Tweet

Transcript

  1. THE BASIC KOTLIN GDG DevFest
 Incheon 2017 pluulove

  2. GDG DevFest
 Incheon 2017 Android Developer GDG Korea Android Organizer

    Android / Kotlin @pluulove
  3. GDG DevFest
 Incheon 2017 WHAT THE KOTLIN?

  4. GDG DevFest
 Incheon 2017 Statically typed programming language for modern

    multiplatform applications 100% interoperable with Java™ and Android™
  5. GDG DevFest
 Incheon 2017

  6. GDG DevFest
 Incheon 2017

  7. GDG DevFest
 Incheon 2017

  8. GDG DevFest
 Incheon 2017 OVERVIEW

  9. GDG DevFest
 Incheon 2017 Basic fun main(args: Array<String>): Unit {

    println("Hello, world!") }
  10. GDG DevFest
 Incheon 2017 Basic fun main(args: Array<String>): Unit {

    println("Hello, world!") } Function Keyword
  11. GDG DevFest
 Incheon 2017 Basic fun main(args: Array<String>): Unit {

    println("Hello, world!") } Function Name
  12. GDG DevFest
 Incheon 2017 Basic fun main(args: Array<String>): Unit {

    println("Hello, world!") } Parameter Name
  13. GDG DevFest
 Incheon 2017 Basic fun main(args: Array<String>): Unit {

    println("Hello, world!") } Parameter Type
  14. GDG DevFest
 Incheon 2017 Basic fun main(args: Array<String>): Unit {

    println("Hello, world!") } Return Type
  15. GDG DevFest
 Incheon 2017 fun main(args: Array<String>): Unit { println("Hello,

    world!") } Basic Return Type Unit return type can be omitted
  16. GDG DevFest
 Incheon 2017 Basic fun main(args: Array<String>) { println("Hello,

    world!") }
  17. GDG DevFest
 Incheon 2017 val text: String = null val

    text: String = null // Error, non-null Type Null Safe
  18. GDG DevFest
 Incheon 2017 val text: String? = null Null

    Safe
  19. GDG DevFest
 Incheon 2017 val text: String? = null Null

    Safe Nullable Keyword
  20. GDG DevFest
 Incheon 2017 val text: String? = null Null

    Safe
  21. GDG DevFest
 Incheon 2017 val text: String? = null text

    = 100.toString() Null Safe val text: String? = null text = 100.toString() // Error, Immutable Data
  22. GDG DevFest
 Incheon 2017 val text: String? = null text

    = 100.toString() Null Safe Immutable
  23. GDG DevFest
 Incheon 2017 var text: String? = null text

    = 100.toString() Null Safe Mutable
  24. GDG DevFest
 Incheon 2017 if (data != null && data.value

    != null) { data.value.toString(); } Null Safe (2)
  25. GDG DevFest
 Incheon 2017 data?.value?.toString() Null Safe (2)

  26. GDG DevFest
 Incheon 2017 val l: Int = if (b

    != null) b.length else -1 Null Safe (3) ~ Elvis Operator val l = b?.length ?: -1 https://kotlinlang.org/docs/reference/null-safety.html#elvis-operator
  27. GDG DevFest
 Incheon 2017 val l: Int = if (b

    != null) b.length else -1 Null Safe (3) ~ Elvis Operator val l = b?.length ?: -1 Elvis Operator https://kotlinlang.org/docs/reference/null-safety.html#elvis-operator
  28. GDG DevFest
 Incheon 2017 fun foo(node: Node): String? { val

    parent = node.getParent() ?: return null val name = node.getName() ?: 
 throw IllegalArgumentException("name expected") // ... } Null Safe (3) ~ Elvis Operator https://kotlinlang.org/docs/reference/null-safety.html#elvis-operator
  29. GDG DevFest
 Incheon 2017 Type Inference val s: String =

    "Value"
  30. GDG DevFest
 Incheon 2017 Type Inference val s = "Value"

    // String val c = 'V' // Char val i = 10 // Int val l = 10L // Long val f = 10F // Float val d = 10.0 // Double val b = true // Boolean val sb = StringBuilder() // StringBuilder
  31. GDG DevFest
 Incheon 2017 Control Flow if / when /

    try
  32. GDG DevFest
 Incheon 2017 Control Flow Statement No Return Value

    Return Value Expression
  33. GDG DevFest
 Incheon 2017 Control Flow (if / when /

    try) int a = 10; String value; if (a > 10) { value = "Over 10"; } else { value = "Under 10"; } val a = 10 val value: String if (a > 10) { value = "Over 10" } else { value = "Under 10" } Java Kotlin
  34. GDG DevFest
 Incheon 2017 Control Flow (if / when /

    try) int a = 10; String value; if (a > 10) { value = "Over 10"; } else { value = "Under 10"; } val a = 10 val value = if (a > 10) { "Over 10" } else { "Under 10" } Java Kotlin
  35. GDG DevFest
 Incheon 2017 val a = 10 val value

    = if (a > 10) "Over 10" else "Under 10" Control Flow (if / when / try) Kotlin
  36. GDG DevFest
 Incheon 2017 Control Flow (if / when /

    try) String value; switch (a) { case 1: value = "one"; break; case 2: value = "two"; break; case 3: value = "three"; break; default: value = "another"; break; } val value: String when { a === 1 -> value = "one" a === 2 -> value = "two" a === 3 -> value = "three" else -> value = "another" } Java Kotlin
  37. GDG DevFest
 Incheon 2017 Control Flow (if / when /

    try) String value; switch (a) { case 1: value = "one"; break; case 2: value = "two"; break; case 3: value = "three"; break; default: value = "another"; break; } val value = when(a) { 1 -> "one" 2 -> "two" 3 -> "three" else -> "another" } Java Kotlin
  38. GDG DevFest
 Incheon 2017 when (x) { parseInt(s) -> print("s

    encodes x") in 1..10 -> print("x is in the range") in validNumbers -> print("x is valid") !in 10..20 -> print("x is outside the range") else -> print("none of the above") } Control Flow (if / when / try) Kotlin
  39. GDG DevFest
 Incheon 2017 when (x) { parseInt(s) -> print("s

    encodes x") in 1..10 -> print("x is in the range") in validNumbers -> print("x is valid") !in 10..20 -> print("x is outside the range") else -> print("none of the above") } Control Flow (if / when / try) Kotlin Expression
  40. GDG DevFest
 Incheon 2017 when (x) { parseInt(s) -> print("s

    encodes x") in 1..10 -> print("x is in the range") in validNumbers -> print("x is valid") !in 10..20 -> print("x is outside the range") else -> print("none of the above") } Control Flow (if / when / try) Kotlin Range
  41. GDG DevFest
 Incheon 2017 when (x) { parseInt(s) -> print("s

    encodes x") in 1..10 -> print("x is in the range") in validNumbers -> print("x is valid") !in 10..20 -> print("x is outside the range") else -> print("none of the above") } Control Flow (if / when / try) Kotlin Not in Range
  42. GDG DevFest
 Incheon 2017 when (x) { parseInt(s) -> print("s

    encodes x") in 1..10 -> print("x is in the range") in validNumbers -> print("x is valid") !in 10..20 -> print("x is outside the range") else -> print("none of the above") } Control Flow (if / when / try) Kotlin Optional, statement / expression
  43. GDG DevFest
 Incheon 2017 Default Parameter public String foo(String name,

    int number, boolean toUpperCase) { return (toUpperCase ? name.toUpperCase() : name) + number; } public String foo(String name, int number) { return foo(name, number, false); } public String foo(String name, boolean toUpperCase) { return foo(name, 42, toUpperCase); } public String foo(String name) { return foo(name, 42); } Java
  44. GDG DevFest
 Incheon 2017 Default Parameter public String foo(String name,

    int number, boolean toUpperCase) { return (toUpperCase ? name.toUpperCase() : name) + number; } public String foo(String name, int number) { return foo(name, number, false); } public String foo(String name, boolean toUpperCase) { return foo(name, 42, toUpperCase); } public String foo(String name) { return foo(name, 42); } Java Default Default
  45. GDG DevFest
 Incheon 2017 Default Parameter fun foo(name: String, number:

    Int = 42, toUpperCase: Boolean = false) = (if (toUpperCase) name.toUpperCase() else name) + number Kotlin
  46. GDG DevFest
 Incheon 2017 Default Parameter fun foo(name: String, number:

    Int = 42, toUpperCase: Boolean = false) = (if (toUpperCase) name.toUpperCase() else name) + number Kotlin
  47. GDG DevFest
 Incheon 2017 Example class Item { private String

    type1; private int type2; private float type3; private float type4; } ▸ setter / getter ▸ hashCode ▸ equals ▸ toString
  48. class Item { private String type1; private int type2; private

    float type3; private float type4; public Item(String type1, int type2, float type3, float type4) { this.type1 = type1; this.type2 = type2; this.type3 = type3; this.type4 = type4; } public String getType1() { return type1; } public void setType1(String type1) { this.type1 = type1; } GDG DevFest
 Incheon 2017 Example
  49. GDG DevFest
 Incheon 2017 class Item { private String type1;

    private int type2; private float type3; private float type4; public Item(String type1, int type2, float type3, float type4) { this.type1 = type1; this.type2 = type2; this.type3 = type3; this.type4 = type4; } public String getType1() { return type1; } public void setType1(String type1) { this.type1 = type1; } public int getType2() { return type2; } public void setType2(int type2) { this.type2 = type2; } public float getType3() { return type3; } public void setType3(float type3) { this.type3 = type3; } public float getType4() { return type4; } public void setType4(float type4) { this.type4 = type4; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Item item = (Item) o; if (type2 != item.type2) return false; if (Float.compare(item.type3, type3) != 0) return false; if (Float.compare(item.type4, type4) != 0) return false; return type1 != null ? type1.equals(item.type1) : item.type1 == null; } @Override public int hashCode() { int result = type1 != null ? type1.hashCode() : 0; result = 31 * result + type2; result = 31 * result + (type3 != +0.0f ? Float.floatToIntBits(type3) : 0); result = 31 * result + (type4 != +0.0f ? Float.floatToIntBits(type4) : 0); return result; } @Override public String toString() { return "Item{" + "type1='" + type1 + '\'' + ", type2=" + type2 + ", type3=" + type3 + ", type4=" + type4 + '}'; } } ӡ~~~~~~~~~~׮ ߸ࣻ ୶о/࢏ઁद ߸҃ ੘স਷ 
 ݅݅ೞ૑ ঋ׮ Example
  50. GDG DevFest
 Incheon 2017 Data Class data class Item( var

    type1: String?, var type2: Int, var type3: Float, var type4: Float)
  51. GDG DevFest
 Incheon 2017 Data Class data class Item( var

    type1: String?, var type2: Int, var type3: Float, var type4: Float) Data Class Keyword
  52. GDG DevFest
 Incheon 2017 Data Class data class Item(var type1:

    String?, var type2: Int, var type3: Float, var type4: Float) // Create Single variable val item = Item(1.toString(), 2, 3.toFloat(), 4.toFloat()) // Create Destructuring Declarations val (type1, type2, type3, type4) = 
 Item(1.toString(), 2, 3.toFloat(), 4.toFloat())
  53. GDG DevFest
 Incheon 2017 Singleton public class A { private

    static final A instance = new A(); private A() {} public static A getInstance() { return instance; } public void b() { System.out.println("Singleton"); } } Java // Use A.getInstance().b()
  54. GDG DevFest
 Incheon 2017 Singleton object A { fun b()

    { println("Singleton") } } Kotlin // Use A.b()
  55. GDG DevFest
 Incheon 2017 Smart Casts if (obj is String)

    { print(obj.length) } https://kotlinlang.org/docs/reference/typecasts.html#smart-casts
  56. GDG DevFest
 Incheon 2017 Smart Casts if (obj is String)

    { print(obj.length) } Type Check https://kotlinlang.org/docs/reference/typecasts.html#smart-casts
  57. GDG DevFest
 Incheon 2017 Smart Casts if (obj is String)

    { print(obj.length) } Smart Casts https://kotlinlang.org/docs/reference/typecasts.html#smart-casts
  58. GDG DevFest
 Incheon 2017 Smart Casts when (x) { is

    Int -> print(x + 1) is String -> print(x.length + 1) is IntArray -> print(x.sum()) }
  59. GDG DevFest
 Incheon 2017 Smart Casts when (x) { is

    Int -> print(x + 1) is String -> print(x.length + 1) is IntArray -> print(x.sum()) } Type Check
  60. GDG DevFest
 Incheon 2017 Smart Casts when (x) { is

    Int -> print(x + 1) is String -> print(x.length + 1) is IntArray -> print(x.sum()) } Smart Casts
  61. GDG DevFest
 Incheon 2017 Smart Casts when (x) { is

    Int -> print(x + 1) is String -> print(x.length + 1) is IntArray -> print(x.sum()) } Type Check
  62. GDG DevFest
 Incheon 2017 Smart Casts when (x) { is

    Int -> print(x + 1) is String -> print(x.length + 1) is IntArray -> print(x.sum()) } Smart Casts
  63. GDG DevFest
 Incheon 2017 Smart Casts when (x) { is

    Int -> print(x + 1) is String -> print(x.length + 1) is IntArray -> print(x.sum()) } Type Check
  64. GDG DevFest
 Incheon 2017 Smart Casts when (x) { is

    Int -> print(x + 1) is String -> print(x.length + 1) is IntArray -> print(x.sum()) } Smart Casts
  65. GDG DevFest
 Incheon 2017 Extension Function inline fun Fragment.toast(message: CharSequence):

    Unit = 
 activity.toast(message) fun Context.toast(message: CharSequence) = 
 Toast.makeText(this, message, Toast.LENGTH_SHORT).show() https://github.com/Kotlin/anko/blob/d5a526512b48c5cd2e3b8f6ff14b153c2337aa22/anko/library/ static/commons/src/dialogs/Toasts.kt // Use in Activity/Fragment toast("Hello World")
  66. GDG DevFest
 Incheon 2017 fun Context.toast(message: CharSequence) = 
 Toast.makeText(this,

    message, Toast.LENGTH_SHORT).show() Extension Function
  67. GDG DevFest
 Incheon 2017 fun Context.toast(message: CharSequence) = 
 Toast.makeText(this,

    message, Toast.LENGTH_SHORT).show() Extension Function Receiver Type
  68. GDG DevFest
 Incheon 2017 fun Context.toast(message: CharSequence) = 
 Toast.makeText(this,

    message, Toast.LENGTH_SHORT).show() Extension Function Function Definition
  69. GDG DevFest
 Incheon 2017 Higher-Order Functions and Lambdas fun <T,

    R> List<T>.map(transform: (T) -> R): List<R> { val result = arrayListOf<R>() for (item in this) result.add(transform(item)) return result }
  70. GDG DevFest
 Incheon 2017 Higher-Order Functions and Lambdas fun <T,

    R> List<T>.map(transform: (T) -> R): List<R> { val result = arrayListOf<R>() for (item in this) result.add(transform(item)) return result } Function Type
  71. GDG DevFest
 Incheon 2017 Higher-Order Functions and Lambdas val list

    = listOf(1, 2, 3) list.map({ x: Int -> x * 2 })
  72. GDG DevFest
 Incheon 2017 Higher-Order Functions and Lambdas val list

    = listOf(1, 2, 3) list.map({ x: Int -> x * 2 }) list.map({ x -> x * 2 })
  73. GDG DevFest
 Incheon 2017 Higher-Order Functions and Lambdas val list

    = listOf(1, 2, 3) list.map({ x: Int -> x * 2 }) list.map({ x -> x * 2 }) list.map() { x -> x * 2 }
  74. GDG DevFest
 Incheon 2017 Higher-Order Functions and Lambdas val list

    = listOf(1, 2, 3) list.map({ x: Int -> x * 2 }) list.map({ x -> x * 2 }) list.map() { x -> x * 2 } list.map { x -> x * 2 }
  75. GDG DevFest
 Incheon 2017 Higher-Order Functions and Lambdas val list

    = listOf(1, 2, 3) list.map({ x: Int -> x * 2 }) list.map({ x -> x * 2 }) list.map() { x -> x * 2 } list.map { x -> x * 2 } list.map { it * 2 }
  76. GDG DevFest
 Incheon 2017 Scope apply also run/with let

  77. GDG DevFest
 Incheon 2017 Scope (apply, also, run, let) Aࠗఠ

    Zө૑ ޙ੗ৌਸ ٜ݅যࠇद׮
  78. GDG DevFest
 Incheon 2017 Scope (apply, also, run, let) val

    result = StringBuilder().apply { for (letter in 'A'..'Z') { append(letter) } } apply ‣ this : StringBuilder() ‣ return : ഐ୹ೠ Receiver
  79. GDG DevFest
 Incheon 2017 val result = StringBuilder().also { for

    (letter in 'A'..'Z') { it.append(letter) } } Scope (apply, also, run, let) also ‣ it : StringBuilder() ‣ return : ഐ୹ೠ Receiver
  80. GDG DevFest
 Incheon 2017 Scope (apply, also, run, let) val

    result = StringBuilder().run { for (letter in 'A'..'Z') { append(letter) } this } run ‣ this : StringBuilder() ‣ return : Block ݃૑݄ ઴
  81. GDG DevFest
 Incheon 2017 val result = StringBuilder().let { for

    (letter in 'A'..'Z') { it.append(letter) } it } Scope (apply, also, run, let) let ‣ it : StringBuilder() ‣ return : Block ݃૑݄ ઴
  82. GDG DevFest
 Incheon 2017 Scope this it self apply also

    result run/with let
  83. GDG DevFest
 Incheon 2017 Collections Immutable Mutable listOf mutableListOf mapOf

    hashMapOf setOf hashSetOf
  84. GDG DevFest
 Incheon 2017 Collections val numbers: MutableList<Int> = mutableListOf(1,

    2, 3) val readOnlyView: List<Int> = numbers println(numbers) // prints "[1, 2, 3]" numbers.add(4) println(readOnlyView) // prints "[1, 2, 3, 4]" readOnlyView.clear() // -> does not compile https://kotlinlang.org/docs/reference/collections.html
  85. GDG DevFest
 Incheon 2017 Collections val _items = mutableListOf<String>() val

    items: List<String> = _items.toList() // Convert Immutable val mutableItems = items.toMutableList() // Convert Mutable
  86. GDG DevFest
 Incheon 2017 Collections val items = listOf(1, 2,

    3, 4) items.first() == 1 items.last() == 4 items.filter { it % 2 == 0 } // returns [2, 4] val rwList = mutableListOf(1, 2, 3) rwList.requireNoNulls() // returns [1, 2, 3] if (rwList.none { it > 6 }) println("No items above 6”) // prints "No items above 6" val item = rwList.firstOrNull() https://kotlinlang.org/docs/reference/collections.html
  87. GDG DevFest
 Incheon 2017 Collections Iterable MutableIterable MutableCollection MutableList MutableSet

    Collection List Set ArrayList ArrayList Read-only interface Mutable interface Java classes
  88. GDG DevFest
 Incheon 2017 Type aliases data class User(val name:

    String, val job: String) typealias Pluu = User println(User("Pluu", "Developer")) // User(name=Pluu, job=Developer) println(Pluu("Pluu", "Developer")) // User(name=Pluu, job=Developer)
  89. GDG DevFest
 Incheon 2017 Type aliases typealias PluuList = List<Pluu>

    val list : PluuList = listOf( User("User Name", "Test1"), Pluu("Pluu Name", "Test2") ) println(list) // [User(name=User Name, job=Test1), User(name=Pluu Name, job=Test2)]
  90. GDG DevFest
 Incheon 2017 Type aliases typealias Predicate<T> = (T)

    -> Boolean fun foo(p: Predicate<Int>) = p(42) fun main(args: Array<String>) { val f: (Int) -> Boolean = { it > 0 } println(foo(f)) // prints "true" val p: Predicate<Int> = { it > 0 } println(listOf(1, -2).filter(p)) // prints "[1]" }
  91. GDG DevFest
 Incheon 2017 KOTLIN FOR ANDROID

  92. GDG DevFest
 Incheon 2017 Android Studio 3.0 https://developer.android.com/kotlin/get-started.html

  93. GDG DevFest
 Incheon 2017 Android Studio 3.0 https://developer.android.com/kotlin/get-started.html

  94. GDG DevFest
 Incheon 2017 Android Studio 3.0 ▸ Tools >

    Kotlin > Configure Kotlin in Project
  95. GDG DevFest
 Incheon 2017 Project Configuration buildscript { ext.kotlin_version =

    '1.1.51' repositories { …… } dependencies { classpath ‘com.android.tools.build:gradle: 3.0.0-rc2' classpath "org.jetbrains.kotlin:kotlin- gradle-plugin:$kotlin_version" } } apply plugin: ‘kotlin-android' dependencies { compile "org.jetbrains.kotlin:kotlin- stdlib-jre7:$kotlin_version" } project build.gradle app build.gradle
  96. GDG DevFest
 Incheon 2017 Kotlin Android Extensions app build.gradle apply

    plugin: 'kotlin-android-extensions' import kotlinx.android.synthetic.main.<layout>.* // kotlinx.android.synthetic.main.activity_main.*
  97. GDG DevFest
 Incheon 2017 Kotlin Android Extensions import kotlinx.android.synthetic.main.activity_main.* class

    MyActivity : Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) textView.setText("Hello, world!") } } <TextView android:id="@+id/textView" ... /> Kotlin Android Extensions
  98. GDG DevFest
 Incheon 2017 Kotlin Android Extensions ~ Parcelable Support

    public class MyParcelable implements Parcelable { private int mData; public int describeContents() { return 0; } public void writeToParcel(Parcel out, int flags) { out.writeInt(mData); } public static final Parcelable.Creator<MyParcelable> CREATOR = new Parcelable.Creator<MyParcelable>() { public MyParcelable createFromParcel(Parcel in) { return new MyParcelable(in); } public MyParcelable[] newArray(int size) { return new MyParcelable[size]; } }; private MyParcelable(Parcel in) { mData = in.readInt(); } } https://github.com/Kotlin/KEEP/blob/master/proposals/extensions/android-parcelable.md
  99. GDG DevFest
 Incheon 2017 Kotlin Android Extensions ~ Parcelable Support

    build.gradle apply plugin: 'kotlin-android-extensions' androidExtensions { experimental = true }
  100. GDG DevFest
 Incheon 2017 Kotlin Android Extensions ~ Parcelable Support

    @Parcelize class MyParcelable(val data: Int): Parcelable https://github.com/Kotlin/KEEP/blob/master/proposals/extensions/android-parcelable.md
  101. GDG DevFest
 Incheon 2017 CHOICE

  102. GDG DevFest
 Incheon 2017 ੺ݎಞ ‣ ۞׬ழ࠳ ‣ Functional Programming

    ‣ Hybrid Language о о૑ח ޙઁٜ ‣ ೠӖ ೠӖ ೠӖ
  103. GDG DevFest
 Incheon 2017 ੺ݎಞ ~ Overhead ▸ Kotlin Compiler

    ী ੄೧ ࢤࢿغח ௏٘ ▸ ࢤпೞח Ѫࠁ׮ ؊ ݆਷ ௏٘о ࢤࢿ ▸ ೞ૑݅, ೙ਃदী ٜ݅যঠೞח ௏٘ ▸ ms ױਤ ର੉ ▸ Javaࠁ׮ וܽѪ਷ ಂ౟
  104. GDG DevFest
 Incheon 2017 ੺ݎಞ ~ Overhead fun test(x: Any)

    { if (x is String) { println(x.length) println(x.length) println(x.length) println(x.length) } } public static final void test(@NotNull Object x) { Intrinsics.checkParameterIsNotNull(x, "x"); if (x instanceof String) { int var1 = ((String)x).length(); System.out.println(var1); var1 = ((String)x).length(); System.out.println(var1); var1 = ((String)x).length(); System.out.println(var1); var1 = ((String)x).length(); System.out.println(var1); } } Kotlin Decompile
  105. GDG DevFest
 Incheon 2017 ੺ݎಞ ~ kapt ▸ Kotlin plugin

    supports annotation processors like Dagger or DBFlow. ▸ kotlinc ▶︎ Kotlin Stubs ▶︎ javac ▶︎ Final Code ▸ Clean Build ೧ঠ૑ ઁ؀۽ ز੘ೞӝب ೣ ▸ ঌ ࣻ হח ী۞
  106. GDG DevFest
 Incheon 2017 ੺ݎಞ ~ ੗߄৬੄ ੉߹਷ ࠛоמ ▸

    Framework Ú Java ▸ Library Ú Java / Kotlin ▸ Your Code Ú Java / Kotlin ▸ Kotlin Compilerо Java Class Codeܳ ݅ٞ ▸ Java to Kotlin, non-null ё୓ী null ਸ ࠁյ ҃਋ …. ী۞ ߊࢤ
  107. GDG DevFest
 Incheon 2017 ൞ݎಞ ‣ Java ޙઁ ೧Ѿ ‣

    Kotlin Android Extensions ‣ טযաח Kotlin ‣ Simple is Best ‣ Support Jetbrains
  108. GDG DevFest
 Incheon 2017 ൞ݎಞ ~ Java ޙઁ ೧Ѿ Java

    6 2006 Java 7 2011 Java 8 2014 Android 1.0 2008 Java 7 Support 2013 Java 8 Support Jack / desugar Different for every version Java 9 ????
  109. GDG DevFest
 Incheon 2017 ൞ݎಞ ~ Java ޙઁ ೧Ѿ

  110. GDG DevFest
 Incheon 2017 https://developer.android.com/about/dashboards/index.html

  111. GDG DevFest
 Incheon 2017 ൞ݎಞ ~ טযաח Kotlin ▸ ࠶۽Ӓ

    / ߊ಴ / ҳӖ ࢠ೒ী Kotlin ࢎਊ੉ ૐо ▸ ӝઓ Java 100% ▶︎ Java (N %) + Kotlin (M %) ▸ ׮೯൤, ೠӖ۽ ੘ࢿغח Ӗٜ੉ ࢤӝҊ ੓਺ ▸ ٘٣য, ೠӖ۽ ػ ଼ 1ӂ੉ ୹द ▸ ழפ੄ ௏ౣܽ (୹द ৘੿)
  112. GDG DevFest
 Incheon 2017 Simple is Beset ▸ Delegation ▸

    Data Class ▸ Singleton ▸ Null Safety ▸ Expression ▸ Destructuring Declarations ▸ Type Checks and Casts
  113. GDG DevFest
 Incheon 2017 ൞ݎಞ ~ Support Jetbrains ▸ Show

    Kotlin Bytecode ▶︎ Decompile ▸ Decompile ػ Java ௏٘۽ ୓௼ оמ
  114. GDG DevFest
 Incheon 2017 Realm Report Q4 2017 Java 85.3%

    Kotlin 14.7% 2017/09/25 Java 49.3% Kotlin 50.7% 2018/12/10
  115. GDG DevFest
 Incheon 2017 http://tech.lezhin.com/2017/08/03/the-case-against-kotlin

  116. GDG DevFest
 Incheon 2017 ֢য়য়য়য়য়য়۱ ೧ঠೠ׮

  117. GDG DevFest
 Incheon 2017

  118. GDG DevFest
 Incheon 2017 ଵҊ ▸ Kotlin Reference (https://kotlinlang.org/docs/reference/) ▸

    Get Started with Kotlin — It is here to stay (https://medium.com/peachstudio/get-started- with-kotlin-it-is-here-to-stay-1eaac85ae6a0) ▸ Kotlin: A New Hope in a Java 6 Wasteland (https://academy.realm.io/posts/droidcon- michael-pardo-kotlin/) ▸ Kotlin੄ ࡄҗ Ӓܿ੗ (http://tech.lezhin.com/2017/08/03/the-case-against-kotlin) ▸ Beyond Kotlin - Advanced features for API Makers (https://speakerdeck.com/agiuliani/ beyond-kotlin-advanced-features-for-api-makers) ▸ Develop your next app with Kotlin - AndroidRennes 2017 (https://speakerdeck.com/agiuliani/ develop-your-next-app-with-kotlin-androidrennes-2017)
  119. GDG DevFest
 Incheon 2017 Q&A GDG Slack #android #kotlin (Slack

    : http://slack.gdg.kr/)