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. 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
  2. 2016 2017 2018 2019 2020 2022 1.0 Google I/O: Kotlin

    Officially supported language for Android Kotlin Timeline
  3. 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
  4. 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
  5. 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
  6. - Google Preferred Language - Statistically typed - Type Inference

    - Developed by Jetbrains - Concise - 100% interoperable with Java - Null Safety - And many more.
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. • 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
  14. • 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
  15. • Is more elegant, concise and safe • Has more

    cool stuff But even with Java 8 Kotlin still...