The Journey From Legacy Code to Idiomatic Kotlin
summary
Outlines a practical path: choose a component, either rewrite file from scratch or use convert Java file to Kotlin then fix compiler errors, address IDE warnings, and make a third commit to refactor into idiomatic Kotlin. Targets are concrete: eliminate remove double bangs by using safe calls, Elvis, local val captures, prefer immutability with by lazy over lateinit, replace nested null checks with let/apply/with, use map/filter for collections, and add @NonNull/@Nullable and @file:JvmName/@JvmMultifileClass for Java interop. Over 70% of time is spent reading such cleaner code.
AI-written summary · about
chapters (9)
- 0:00Introduction to legacy Kotlin
- 1:16Defining idiomatic Kotlin
- 3:42Null safety in Kotlin
- 6:51Immutability in Kotlin
- 8:58Concise and expressive code
- 11:49Java interoperability tips
- 13:53Refactoring strategies
- 14:56Ensuring idiomatic code
- 15:39Final thoughts and Q&A
related talks
35mPractical Tips For Legacy Java Codebases Conversion Into Kotlin
31mA Kotlin Journey
46mThe Road to Kotlintown
39mHow to Kotlin - from the lead Kotlin language designer
39mKotlin, Practically Speaking
43mFrom Effective Java to Effective Kotlin
33mPragmatic Kotlin on Android
33mTravelling across Asia - Our journey from Java to Kotlin
