Better Ruby through Functional Programming
summary
Argues that immutability and side‑effect‑free functions make Ruby code easier to reason about and scale to many cores, demonstrates an immutable Person via attr_reader and freeze the array, shows the Fibonacci as recursive example and warns about stack overflow despite Ruby 1.9.2 tailcall workarounds, and implements actor concurrency using the omnibus gem with message types RequestGreeting/Greeting (spawn loop, pattern match, reply with <<). Notes costs: extra object allocation and harder debugging for recursion.
AI-written summary · about
chapters (4)
- 0:00Start
- 8:47First-Class Functions in R
- 24:14side-effect function
- 27:16Threads: Jim Weiri Dramatis: Steven
related talks
44mFunctional Programming for Rubyists
26mBlending Functional and OO Programming in Ruby
24mFunctional programming for fun and profit!!
35mThe Functional Rubyist
40mMake Ruby Functional Again!
42mTaking inspiration from the functional world
34mDon't Fear The Lambda
45mFunctional programming vs. Object-oriented Programming
