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

Wondering in Kotlin Multiverse - Turing Community

Wondering in Kotlin Multiverse - Turing Community

🔊 Wajahat Karim talks about the history and evolution of Kotlin and how it got to Kotlin Multiplatform supporting all major targets like Android, iOS, Web, Desktops etc.

Video: https://youtu.be/ajyzYVB6Mic

This event was organized by Turing Community. https://community.turing.com/events/details/turing-apac-community-presents-whats-new-in-kotlin/

Wajahat Karim

April 04, 2022
Tweet

More Decks by Wajahat Karim

Other Decks in Education

Transcript

  1. Wondering in Kotlin
    Multiverse
    Wajahat Karim
    Google Developer Expert in Android
    wajahatkarim.com

    View full-size slide

  2. This is Wajahat Karim!
    - Google Developer Expert in Android
    - Over 8 years experience in Android
    - Open Source Contributor
    - Technical Blogs & Books Writer
    - Love to share my knowledge with others
    Follow me on Twitter @WajahatKarim
    Visit my website: wajahatkarim.com

    View full-size slide

  3. life begins
    at the end of your
    COMFORT
    ZONE
    -Neale Donald Walsch-

    View full-size slide

  4. Modern Language

    View full-size slide

  5. 2016 2017 2018 2019 2020 2022
    Kotlin Timeline

    View full-size slide

  6. 2016 2017 2018 2019 2020 2022
    1.0
    Kotlin Timeline

    View full-size slide

  7. 2016 2017 2018 2019 2020 2022
    1.0 Google I/O: Kotlin Officially supported language for Android
    Kotlin Timeline

    View full-size slide

  8. 2016 2017 2018 2019 2020 2022
    1.0
    Google I/O: Kotlin Officially supported language for Android
    Google I/O: Android goes Kotlin-first
    Kotlin Timeline

    View full-size slide

  9. 2016 2017 2018 2019 2020 2022
    1.0
    Google I/O: Kotlin Officially supported language for Android
    Google I/O: Android goes Kotlin-first
    Coroutines Preferred
    Kotlin Timeline

    View full-size slide

  10. Kotlin Timeline
    2016 2017 2018 2019 2020 2022
    1.0
    Google I/O: Kotlin Officially supported language for Android
    Google I/O: Android goes Kotlin-first
    You are here
    Coroutines Preferred

    View full-size slide

  11. Expressiveness Safety
    Interoperability Structured
    concurrency

    View full-size slide

  12. - Google Preferred Language
    - Statistically typed
    - Type Inference
    - Developed by Jetbrains
    - Concise
    - 100% interoperable with Java
    - Null Safety
    - And many more.

    View full-size slide

  13. Java vs Kotlin

    View full-size slide

  14. Java to Kotlin

    View full-size slide

  15. Tools For Kotlin.

    View full-size slide

  16. class MainActivity : AppCompatActivity () {
    override fun onCreate(savedInstanceState: Bundle?) {
    ...
    fab.setOnClickListener { view ->
    Snackbar.make(view,
    "Hello ${name.capitalize()}",
    Snackbar.LENGTH_LONG).show()
    }
    fab.backgroundTintList = backgroundTintList
    }
    }
    A Wide Kotlin Example

    View full-size slide

  17. class MainActivity : AppCompatActivity () {
    override fun onCreate(savedInstanceState: Bundle?) {
    ...
    fab.setOnClickListener { view ->
    Snackbar.make(view,
    "Hello ${name.capitalize()}",
    Snackbar.LENGTH_LONG).show()
    }
    fab.backgroundTintList = backgroundTintList
    }
    }
    Nullability in the
    type system
    A Wide Kotlin Example

    View full-size slide

  18. class MainActivity : AppCompatActivity () {
    override fun onCreate(savedInstanceState: Bundle?) {
    ...
    fab.setOnClickListener { view ->
    Snackbar.make(view,
    "Hello ${name.capitalize()}",
    Snackbar.LENGTH_LONG).show()
    }
    fab.backgroundTintList = backgroundTintList
    }
    }
    Nullability in the
    type system
    Lambdas
    A Wide Kotlin Example

    View full-size slide

  19. class MainActivity : AppCompatActivity () {
    override fun onCreate(savedInstanceState: Bundle?) {
    ...
    fab.setOnClickListener { view ->
    Snackbar.make(view,
    "Hello ${name.capitalize()}",
    Snackbar.LENGTH_LONG).show()
    }
    fab.backgroundTintList = backgroundTintList
    }
    }
    Nullability in the
    type system
    Lambdas
    Extension
    functions
    A Wide Kotlin Example

    View full-size slide

  20. class MainActivity : AppCompatActivity () {
    override fun onCreate(savedInstanceState: Bundle?) {
    ...
    fab.setOnClickListener { view ->
    Snackbar.make(view,
    "Hello ${name.capitalize()}",
    Snackbar.LENGTH_LONG).show()
    }
    fab.backgroundTintList = backgroundTintList
    }
    }
    Nullability in the
    type system
    Lambdas
    Template
    expressions
    Extension
    functions
    A Wide Kotlin Example

    View full-size slide

  21. class MainActivity : AppCompatActivity () {
    override fun onCreate(savedInstanceState: Bundle?) {
    ...
    fab.setOnClickListener { view ->
    Snackbar.make(view,
    "Hello ${name.capitalize()}",
    Snackbar.LENGTH_LONG).show()
    }
    fab.backgroundTintList = backgroundTintList
    }
    }
    Nullability in the
    type system
    Lambdas
    Template
    expressions
    Extension
    functions
    Property access
    syntax for getters
    and setters
    A Wide Kotlin Example

    View full-size slide

  22. ● Data Classes
    ● Extension Methods
    ● Elvis Operator
    ● Properties
    ● Default Parameters
    ● Type Aliases
    ● Named Parameters
    ● Spread Operator
    ● Auto Casts
    ● Covariance
    ● Null Safety
    ● Operator Overloading
    ● Type Inference
    ● DSL Support
    ● Type-Safe Builders
    ● Coroutines
    ● String Interpolation
    ● Ranges
    ● Map Array Syntax
    ● Inline Functions
    ● Sealed Classes
    ● Delegation
    ● Destructuring
    ● KDoc

    View full-size slide

  23. But wait….

    View full-size slide

  24. • Advantages over Java 7 are overwhelming
    • Java 8 introduced
    • Lambdas
    • Null safety (“Optional” class)
    • Default methods
    • Streams API
    • New Date & Time API
    Java strikes back with Java 8

    View full-size slide

  25. • Is more elegant, concise and safe
    • Has more cool stuff
    But even with Java 8 Kotlin still...

    View full-size slide

  26. Resources
    • https://kotlinlang.org/
    • https://play.kotlinlang.org/
    • https://developer.android.com/courses/fundamentals-training/toc-v2

    View full-size slide

  27. Thank you for listening...
    @WajahatKarim
    wajahatkarim.com youtube.com/c/wajahatkarim3

    View full-size slide