Kotlin is Multi-Paradigm
- No program is 100% pure functional
- Push state out to the ‘edges’.
- Place application’s core data and logic in immutable constructs (value types).
- Represent state as objects with mutable references to immutable core constructs.
- Shell: OOP, state, IO, Side effects, GUI
- Core: Pure functions, stateless, logic
- Use functional parameters to inject functions with side effects
- Use functional parameters on the boundary of your shell/core