9 Java Patterns that Kotlin made obsolete
summary
Nine specific Java patterns get replaced by Kotlin language features with concrete examples and results: nullable types remove Optional for returns/params/props with compiler enforcement; default and named arguments replace overload proliferation; extension functions and properties replace util classes; objects replace singletons with thread‑safe lazy init; Kotlin DSLs (example: Spring MockMvc Kotlin DSL) and operator/compareTo functions simplify builders, iterators and comparators; interface delegation replaces strategy boilerplate. Each pattern shows fewer lines, less error‑prone code and working, readable replacements.
AI-written summary · about
chapters (10)
- 0:00Start
- 3:33The nullable types are mightier than the Optional
- 5:13Use default/named arguments not overloading!
- 6:48Extend classes with extension functions/properties not utils!
- 8:15Prefer functions to classes! Whenever possible
- 9:39Never write Singletons! Only ever use objects.
- 12:40Don't be afraid of DSLS. Learn to love them.
- 14:25Use operator functions.
- 15:43Think of the reader not the writer.
- 16:09Strategy
related talks
31mDesign Patterns with Kotlin
01h 03mHow Kotlin makes your Java code better
43mFrom Effective Java to Effective Kotlin
30mWhat can Kotlin do for me?
49mAn Introduction to Kotlin
50mKotlin is as awesome as you've heard. Here's why.
44mAdvanced Kotlin
39mHow to Kotlin - from the lead Kotlin language designer
