Pure Kotlin - Beautiful World Without Loops & Variables
summary
Shows how Kotlin expresses Haskell-style techniques: immutable data classes with copy, persistent lists (vavr), and replacing loops/vars with folds so compilation catches new variants instead of silent bugs. Builds an IO-like lazy wrapper (pancakes / nalewshnik) and a simple transaction monad to sequence side effects, demonstrates Arrow FX and Ktor examples, and adds a Detekt plugin plus baseline to ban vars/returns and enforce pure code rules. Claims fewer production surprises and easier reasoning with IO/monad and Detekt plugin enforcement.
AI-written summary · about
chapters (16)
- 0:00The quest for better code
- 2:08Defining functional programming
- 4:20Deterministic and total functions
- 6:41Referential transparency and purity
- 9:16Composability in functional code
- 10:25Kotlin features for FP
- 13:00Immutability and data structures
- 16:01Guava for business logic
- 17:27Type inference and safety
- 21:01Expressions and pattern matching
- 25:21Side effects in functional style
- 29:19Handling side effects with IO monad
- 32:00Functional programming in frameworks
- 36:40Enforcing purity with tools
- 39:05Evolution of programming tools
- 44:11Final thoughts on functional adopt
