How I learned to stop worrying and love Functional Design
summary
Argues that three concrete rules—local reasoning, purity, and composition—produce maintainable design, and demonstrates them with Scala code: first an IO trait as a data structure with getLine/putLine constructors and a chain operator, plus an interpreter that folds and runs the program via unsafeRun. Shows that wrapping effects as data lets programs be inspected, compared and optimized without executing them, points out the executable vs declarative encodings tradeoffs, and notes a stack‑safety limitation requiring trampolining.
AI-written summary · about
chapters (16)
- 0:00Intro
- 2:33The problem
- 3:35Coding examples
- 6:17Side effects
- 9:17Local reasoning
- 9:39Local reasoning benefits
- 12:03Local reasoning vs side effects
- 12:50An example
- 19:20Implementation value
- 20:36Data structure
- 22:19Nested data structure
- 25:12Similarities
- 28:18API Composition
- 29:27Pro Tips
- 30:34Recap
- 31:49Questions
related talks
47mThe 4 Rules of Simple Design In Functional Programming
57mThe Fun of Functional Programming Panel
49m“Applying functional programming in code design"
34mPatterns of a pragmatic functional architecture
01h 44mFunctional Programming: Technical Reasons to Adapt
33mEXPLAIN FP LIKE RICHARD FEYNMAN
45mFunctional Refactoring: How to Approach It
01h 00mWhat The Functional Programming
