~/talk

Refactoring to Immutability

Talkat NDC London 2018 · 2018-01-15..01-19· [frontend-architecture, typescript]
slides:none on file

Shows concrete refactor steps: replace singletons by pass a clock or a time value so tests become pure, turn setters into replace setters with with-methods that return new value objects, and swap mutable collections for persistent collections (shared tails, tree sharing) to avoid full copies. Explains a quadrant (shared/unique × mutable/immutable) that pinpoints when locks are necessary, gives a stack example implemented immutably, and notes performance and GC tradeoffs.

AI-written summary · about

  1. 0:00The case for immutability
  2. 1:45Understanding moving parts
  3. 5:11Achieving reasonable code
  4. 8:17The problem with global state
  5. 12:14Quadrant of synchronization
  6. 14:48History of concurrency
  7. 17:56Architectural refactoring
  8. 21:06Breaking singleton habits
  9. 25:01Refactoring dependencies
  10. 29:42Value object design
  11. 34:07Transforming state
  12. 39:26Persistent data structures
  13. 44:21Immutable collections
  14. 51:08Dataflow and conclusion
~/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.