Pushing Kotlin Beyond the Limits of Sanity
summary
Shows concrete Kotlin pitfalls and fixes: misuse of Pair/Triple and the name-based destructuring flag (Kotlin 2.4/2.5), dangerous operator overloads like a joking REM operator and infix precedence traps, extension pollution vs value classes, and when to use inline/crossinline/reified. Recommends tools and processes: KTLint, ADRs, documented rules, and an included skill.md file for AI guardrails. Demonstrations include broken code examples, the surprising precedence bug (addition before infix), and pragmatic rules that improve maintainability.
AI-written summary · about
chapters (13)
- 0:00Introduction and context
- 3:15Regrets and lessons learned
- 4:41Pairs and triples pitfalls
- 10:09Operator overloading dangers
- 16:08Infix functions and readability
- 19:24Extensions and value classes
- 23:17Inline functions and reification
- 26:50Covariance and contravariance
- 31:26Domain-specific languages
- 35:16AI and code quality
- 37:04Legacy code and team balance
- 39:55Egoless programming mindset
- 42:23Closing and Q&A
