~/talk

Functional Programming Anti-Patterns in Java

Talkat XtremeJ 2023 · on Tuesday, 2023-11-07· [java, functional-programming]
slides:none on file

Using Java and Hibernate, making entities immutable regularly backfires; cloning immutable collections (example: Kotlin fold) can allocate 400 MB for 5,000 elements. Loops that create an empty list then add are an anti-pattern—replace accumulator loops with streams + collect, prefer peek over misused map for side effects, and use max instead of complex reduce so avoid reduce. IntelliJ quick fixes can hide mutations. CompletableFuture pain points fade with Java 21 Virtual Threads; only two teams saw real latency issues (≈50 microseconds).

AI-written summary · about

  1. 0:00Introduction and speaker intro
  2. 1:25Functional programming in Java basics
  3. 3:55Immutable objects pitfalls
  4. 8:12Anti-patterns with loops
  5. 10:19Misusing streams and side effects
  6. 15:32Functional chainsaw and overcomplication
  7. 21:10Exceptions and monads misuse
  8. 24:44Optional anti-patterns
  9. 27:55High-order function risks
  10. 29:40Reduce anti-pattern deep dive
  11. 33:14Conclusion and community invite
~/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.