~/talk

Pure Functions and Immutable Objects

Talkat Devnexus 2021 · 2021-02-17..02-18· [functional-programming, java]
slides:none on file

Argues that isolating a functional core of pure functions and pushing I/O and side effects to an imperative shell makes logic referentially transparent, easier to test, parallelize, and refactor (replace temp with query, inline parameters, split phase). Recommends Java tooling: use Hibernate embeddables for immutable subobjects, Lombok value or records, and IntelliJ’s Analyze Data Flow to Here. Notes tradeoffs: validate immutables at construction, avoid cloning collections wildly, GC handles many small immutables but avoid them if you create millions per second. Only one of ~50 companies fully persists immutable entities.

AI-written summary · about

  1. 0:00Introduction and speaker intro
  2. 2:10Signs of impure functions
  3. 3:57Pure vs impure functions
  4. 6:43Pure function quiz
  5. 10:51Benefits of pure functions
  6. 13:21Trust and purity in teams
  7. 15:07Functional core and imperative shell
  8. 19:01Mutable vs immutable objects
  9. 22:47Immutable class design
  10. 26:14Why final classes are unnecessary
  11. 28:05Breaking down large objects
  12. 30:36When to use immutable objects
  13. 32:00Immutable objects in workflows
  14. 33:48Returning multiple values
  15. 34:49Performance of immutable objects
  16. 36:14Key takeaways and summary
~/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.