Java Releases
11
J2SE 1.4 February 2002
J2SE 5.0 September 2004
Java SE 6 December 2006
Java SE 7 July 2011
Java SE 8 (LTS) March 2014
Java SE 9 September 2017
Java SE 10 March 2018
Java SE 11 (LTS) September 2018
Java SE 12 March 2019
Java SE 13 September 2019
https://en.wikipedia.org/wiki/Java_version_history
Fast Evolution of Kotlin
●Decoupled From Java Virtual Machine (JVM)
●Compiler Plugin + Standard Libraries -> Java Bytecode
Slide 22
Slide 22 text
No content
Slide 23
Slide 23 text
23
Slide 24
Slide 24 text
It’s The Little Things
Slide 25
Slide 25 text
No content
Slide 26
Slide 26 text
Why I Left Java for Kotlin - Live Coding
https://github.com/handstandsam/why-i-left-java-for-kotlin
Slide 27
Slide 27 text
My Favorite Features
●Java Interop
●Extension Functions
●Ability to Convert Java -> Kotlin
●Null Safety
●Data Classes
●Immutability (val)
●Named Parameters
●No “new” or “;”
●Higher Order Functions & Lambdas
●Sealed Classes
●Coroutines - Reactive Programming
Slide 28
Slide 28 text
Coroutines
Slide 29
Slide 29 text
Kotlin Coroutines
Explained in one slide
• A function with a suspend keyword signifies it must run in a Coroutine
suspend fun doNetworkRequest() : Result {
// Network Request Occurs
}
• suspend functions must be executed within a CoroutineContext and Once
inside a coroutine, code executes sequentially
CoroutineContext(Dispatchers.Default).launch{
val result = doNetworkRequest()
processResult(result)
}
Slide 30
Slide 30 text
“Essentially, coroutines are light-weight
threads. They are launched in a context
of some CoroutineScope.”
Slide 31
Slide 31 text
“Essentially, coroutines are light-weight
threads. They are launched in a context
of some CoroutineScope.”
Not All Roses
●Non-Ideal Interop For Some Java Frameworks and
Libraries
●Pick the right tool for the job
●Not everyone knows Kotlin yet
●Your team may not want to do Kotlin because it’s too
“risky”
Slide 43
Slide 43 text
I Love Kotlin
❤
Slide 44
Slide 44 text
Dear Java,
You taught me about NullPointerExceptions, verbose
code and mutable data. I will always love you, but
I’ve met a language named Kotlin, and I’m moving on.
Love,
-Sam
Slide 45
Slide 45 text
Why I Left Java
For Kotlin
Sam Edwards - @HandstandSam
Thank You!
Slide 46
Slide 46 text
No content
Slide 47
Slide 47 text
Kotlin to Java Bytecode
Slide 48
Slide 48 text
Kotlin Compilation to Java Bytecode
Code.kt Code.class
Kotlin Compiler