~/talk

Ten Common Mistakes Made in Functional Java 1

Talkat Oracle Code One 2018 · 2018-10-22..10-25· [java]
slides:none on file

A list of concrete anti-patterns and fixes for Java 8/9 functional code: avoid large block lambdas—extract a named method and use a method reference; return collections not streams because streams are single-use and lazy; don’t mutate objects inside map—return new immutable instances; avoid multiple terminal ops/forEach for side effects; mind operation order (distinct before limit) and infinite streams with parallel; prefer orElseGet vs orElse to avoid eager evaluation; handle checked exceptions by wrapping or using Either/Try (Vavr) to collect failures instead of aborting the stream.

AI-written summary · about

  1. 0:00Introduction to Functional Java
  2. 2:46Lambda expression best practices
  3. 6:11Stream pipeline pitfalls
  4. 11:43Immutability and data flow
  5. 17:30Effective use of forEach
  6. 20:07Order of operations
  7. 26:26Optional handling techniques
  8. 33:55Exception handling in streams
~/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.