Blending Functional and OO Programming in Ruby
summary
Argues that Ruby benefits from small, immutable objects that behave like functions using the call method, and shows concrete libraries and results: Ruby ObjectMapper yields immutable functional objects, a custom pipeline composition operator composes steps, and Transflow stitches transactional steps and uses the whisper gem for publish/subscribe so controllers can pass contextual info. Demonstrates partial application/auto‑curry so loggers and persisters are reusable, reports cleaner Rails code after refactoring and fewer coupling bugs.
AI-written summary · about
chapters (4)
- 0:00Start
- 0:33Objects! Interfaces! Messages! Encapsulation!
- 16:26Functional Interfaces
- 18:09Functional Composition
related talks
44mReal-World Functional Ruby
42mTaking inspiration from the functional world
33mBetter Ruby through Functional Programming
28mFunctional Principles for OO Development
40mMake Ruby Functional Again!
34mSprinkles of Functional Programming
26mFrom OO Patterns to Functional Programming w/o Killing Yourself
34mThinking in Objects
