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

Why Kotlin?

Avatar for Sevil Sevil
December 12, 2019
23

Why Kotlin?

Talking about strength of Kotlin and the reasons why people should give a chance to it in addition to its application areas where most of the people still thinks Kotlin is only for Android.

Avatar for Sevil

Sevil

December 12, 2019
Tweet

Transcript

  1. HISTORY ▸ Not new at all 2011 -> 2012, Saint

    Petersburg ▸ Created by Jetbrains To increase their productivity Drive company business by keeping trust Drive sales of Intellij IDEA ▸ February 15, 2016 ▸ Google IO - 2017
  2. KOTLIN ▸ Static typing Compile time 1. Performance is better

    2. More reliable 3. Easier to maintain Type Inference (in contrast to Java) ▸ Object Oriented and Functional Design around object and supports OO concepts Not purely functional but : A. Lambda Expressions B. higher-order functions, C. operator overloading, lazy evaluation and much more. D. First class functions, immutability and no side effects
  3. PROGRAMMING LANGUAGE FOR ECMAScript 5.1 EXISTING THIRD-PARTY LIBRARIES REACT COMMUNITY

    COMMONJS, AMD AND UMD LLVM MULTIPLATFORM Server-side development Kotlin-first
  4. KOTLIN IS INSPIRED ‣ JAVA, ‣ C#, ‣ JAVASCRIPT, ‣

    SCALA ‣ GROOVY ‣ GO, ‣ SWIFT ‣ ETC by existing languages such as
  5. KOTLIN IS INSPIRED ‣ JAVA, ‣ C#, ‣ JAVASCRIPT, ‣

    SCALA ‣ GROOVY ‣ GO, ‣ SWIFT ‣ ETC by existing languages such as
  6. KOTLIN IS LESS PRONE TO ERROR ✴ Immutability ✴ Null

    Safety ✦ Java Code is defensive (NPE) ✦ Safe Call Operator (?) ✦ Safe Cast Operator (as?)
  7. KOTLIN IS SCALABLE ✴ Coroutines private suspend fun loadAllCategoriesTab() {

    val user = withContext(Dispatchers.IO) { getUser() } val recentlyUsedProducts = async { setupMyLatestUsedProducts(user.id) } val usedGearsOnThisCatch = async { setupUsedGears(user.id) } val topProductUnitsForCategoryByUser = { fetchTopProductUnitsForCategoryByUser(user.id) } setUserAllProductUnit( usedGearsOnThisCatch?.await(), recentlyUsedProducts?.await(), topProductUnitsForCategoryByUser.await().toMutableList() ) }
  8. KOTLIN IS EASY TO ADOPT ▸ Easy to learn ▸

    Terrific Support and great tools
  9. CONCERN: YOUNG PROGRAMMING LANGUAGE CAN IT BE ADOPTED QUICKLY? We

    all know that most of us, software developers, love to chase after shiny things just as much as we like to build them. This is not different for programming languages. And, in this day and age, new young programming languages pop up like mushrooms
  10. KOTLIN: YOUNG PROGRAMMING LANGUAGE “… DO I HAVE TO LOSE

    ALL THE GREAT FEATURES OF MY IDE NOW?” Sofie
  11. COMPANIES 1. Google 2. Amazon 3. Netflix 4. Pinterest 5.

    Uber 6. Foursquare 7. Trello 8. Squares 9. Capital One 10. Coursera 11. Basecamp 12. Corda 13. JetBrains (obviously)
  12. KEY TAKE AWAYS ▸ Kotlin brings compile time null checks,

    functional aspects and expressive syntax to the JVM platform ▸ Kotlin is interoperable with Java and can be introduced incrementally to an existing Java project ▸ Projects heavy on boilerplate and logic are good candidates adopting Kotlin ▸ Kotlin integrates well with popular frameworks including Spring and HIbernate ▸ Kotlin can significantly reduce the size of a Java code base by eliminating boilerplate