Immaculate Code (pure code)
summary
Argues that most business applications gain from immutability and isolating side effects, showing concrete techniques: use of Vavr and Okasaki-style persistent vectors to avoid mutation costs, and Kotlin data classes + copy as a pragmatic way to reduce Java boilerplate. Explains encoding errors and side effects with monads/futures instead of exceptions, discusses Java annotation/compile pain, and compares trade-offs where Scala/Haskell offer more safety but at higher cost; notes persistent structures are efficient for typical tiny lists (0,1,...).
AI-written summary · about
chapters (17)
- 0:00Introduction
- 2:27Why functional programming
- 9:15OOP vs functional
- 11:46Expressions over statements
- 13:12Immutability
- 16:24Kotlin benefits
- 22:40Immutable collections
- 23:00Pure functions and determinism
- 29:25Side effects
- 33:14Limiting side effects with types
- 35:41Monads
- 39:19Alternative polymorphism
- 41:47Avoiding bugs
- 43:58Type safety vs tests
- 45:24Objects vs records in Kotlin
- 47:30Testing with expressions
- 48:54Functional challenges
related talks
42mPure Functions and Immutable Objects
31mLet's get Functional (en)
01h 44mFunctional Programming: Technical Reasons to Adapt
01h 01mThe Power and Practicalities of Immutability
34mThe Hitchhiker Guide to Pure Functions and Immutable Objects
31mSide-effects are not your friend
34mPrinciples of functional programming with examples in Java and Haskell
01h 01mLeaving side effects aside
