~/talk

Functional Refactoring: How to Approach It

TalkinFrenchat Scala.IO 2017 · 2017-11-02..11-03· [functional-programming]
slides:none on file

Concrete Scala refactoring techniques to make code functional: replace nulls, vars and throws with Option/Either for explicit signatures and Result types for errors; convert loops into filter/map with small composable predicate functions; and confine side effects by wrapping file reads/writes in an IO/task that defers execution so parsing and tests can run without touching the filesystem. The talk shows concrete code transformations and explains that using an IO wrapper preserves previous behavior while enabling pure business-logic extraction and easier testing.

AI-written summary · about

  1. 0:00Functional programming intro
  2. 8:02Pure functions and side effects
  3. 11:54Refactor imperative to FP
  4. 17:07Collections and generic functions
  5. 23:31Extract business predicates
  6. 26:41Handling unavoidable side effects
  7. 30:36Delaying side effects with IO
  8. 34:12Progressive FP adoption
  9. 37:41FP best practices
  10. 44:01Q&A
~/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.