~/talk

Laziness is a Virtue: Lazy, Functional, Immutable Ruby

Talkat Rocky Mountain Ruby 2024 · 2024-10-07..10-08· [ruby]
slides:none on file

Argues that computing values only when needed improves readability and changeability and shows concrete Ruby techniques: refactoring a Rails controller to defer current_account, using the memoization idiom (and its thread and nil caveats) and the memorizable/memo gems, defining immutable value objects with Ruby 3.2 data class and overrides, using ActiveRecord lazy relations and Lazy enumerators to build queries without executing them, and applying a functional-core/imperative-shell pattern to keep side effects isolated.

AI-written summary · about

  1. 0:00Introduction
  2. 1:05Laziness
  3. 3:20Memorization
  4. 10:31Functional Programming
  5. 12:04Lazy
  6. 15:54Better Styles
  7. 17:37Lazy Manifesto
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.