~/talk

Refactoring to Functional Style

Talkat Oracle OpenWorld 2017 · 2017-10-01..10-05· [java]
slides:none on file

Argues that refactoring Java imperative code to Java 8 functional style produces clearer, shorter code and enables lazy infinite streams and better reuse. Shows concrete rewrites: prime test using IntStream.range + noneMatch, line counting with Files.lines + filter + count, grouping with Collectors.groupingBy, Pythagorean triples via Stream.iterate + flatMap, and summing K prime square roots with filter(mapToDouble(limit(sum))). Demonstrations compile and produce identical results while removing loop variables and accidental complexity.

AI-written summary · about

  1. 0:00Introduction
  2. 8:38Functional Style
  3. 13:51Accidental Complexity
  4. 18:48Functions
  5. 21:49Example
  6. 27:56Flat Map
  7. 32:38Coding
  8. 39:13Summary
~/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.