~/talk

Immutability Matters

Talkat Garden City Ruby 2015 · on Saturday, 2015-01-10· [ruby, concurrency]
slides:none on file

A Ruby POC finds string constants mutate via << causing global path corruption and fixes it by applying freeze + concatenation or string interpolation; deep object freezing uses Ice Nine deep_freeze or the IceLine gem for recursive freeze. Immutable value objects follow three concrete rules: constructibility (init-only fields), equality (value-based equals, eql and hash), and single responsibility to avoid giant constructors. Libraries tested include Hamster and Values; RSpec HTTP aims for immutability but hits performance and deletion/caching tradeoffs in practice.

AI-written summary · about

  1. 0:00Start
  2. 1:24Your code is full of immutability. Make it explicit.
  3. 6:26Equality - Henry G Baker
  4. 8:59Why Immutable Classes?
  5. 9:44Functional Core/ Imperative Shell
  6. 10:08Code Quality Code Reusability Safer from defects
  7. 10:50Simple Design Simple Test Concurrency Cyclic References
  8. 12:33Liabilities
  9. 14:09There is always a trade-off between performance and RUBYCONF
  10. 14:43Deletion is a form of mutation, cannot cache user data forever.
  11. 17:40Frameworks
~/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.