~/talk

Design Patterns in the Light of Lambda Expressions

Talkat J-Fall 2022 · on Thursday, 2022-11-03· [java, functional-programming]
slides:none on file

Shows how common OO patterns shrink into a few lambdas: the Strategy becomes a simple method taking a Predicate (example totals 1–10 → 55 then filters evens/odds), the Decorator becomes function composition using Function.reduce and Function.identity, and resource management becomes a static resource.use(Consumer) that makes constructor and close private so cleanup always runs (a concrete execute-around or loan pattern). Uses Java features: Predicate, Function, Stream.reduce, Consumer, AutoCloseable/try-with-resources; examples compile conceptually and remove boilerplate.

AI-written summary · about

  1. 0:00Introduction to design patterns
  2. 2:11Design patterns as communication tools
  3. 3:36Lambdas and functional composition
  4. 4:18Strategy pattern with lambdas
  5. 10:41Decorator pattern with functions
  6. 22:00Execute around method pattern
  7. 36:13Resource management with lambdas
  8. 41:35Summary and key takeaways
~/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.