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 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 Slide

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

    View Slide

  4. Modern Language

    View Slide

  5. View Slide

  6. 2016 2017 2018 2019 2020 2022
    Kotlin Timeline

    View Slide

  7. 2016 2017 2018 2019 2020 2022
    1.0
    Kotlin Timeline

    View Slide

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

    View 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
    Kotlin Timeline

    View Slide

  10. 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 Slide

  11. 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 Slide

  12. WHY KOTLIN?

    View Slide

  13. Expressiveness Safety
    Interoperability Structured
    concurrency

    View Slide

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

    View Slide

  15. Java vs Kotlin

    View Slide

  16. Java to Kotlin

    View Slide

  17. Tools For Kotlin.

    View 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
    }
    }
    A Wide Kotlin Example

    View 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
    A Wide Kotlin Example

    View 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
    A Wide Kotlin Example

    View 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
    Extension
    functions
    A Wide Kotlin Example

    View Slide

  22. 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 Slide

  23. 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 Slide

  24. ● 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 Slide

  25. But wait….

    View Slide

  26. View Slide

  27. View Slide

  28. View Slide

  29. View Slide

  30. View Slide

  31. View Slide

  32. View Slide

  33. View Slide

  34. View Slide

  35. View Slide

  36. View Slide

  37. View Slide

  38. View Slide

  39. View Slide

  40. View Slide

  41. View Slide

  42. View Slide

  43. View Slide

  44. View Slide

  45. View Slide

  46. View Slide

  47. View Slide

  48. View Slide

  49. • 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 Slide

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

    View Slide

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

    View Slide

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

    View Slide