~/talk

g ∘ f patterns

Talkat Devoxx UK 2017 · 2017-05-11..05-12· [functional-programming, java]
slides:none on file

Argues that many GoF behavioral patterns are workarounds for missing higher‑order functions and shows live Java code that replaces them with lambdas, streams and function types: rewrites Command as Java 8 lambdas over Runnable, Strategy as a Predicate + Function, Template as a resource- lending method using Consumer that always disposes, Decorator as function composition with DoubleUnaryOperator, Chain of Responsibility as a Stream of functions returning Optional (and uses Optional.stream in Java 9), Interpreter via a Map of BinaryOperator and stack, and a pattern‑matching DSL (Vavr-style); examples compile and produce the same results while removing boilerplate.

AI-written summary · about

  1. 0:00Introduction to talk
  2. 1:51Behavioral patterns in GoF
  3. 3:16Command pattern in Java
  4. 8:15Strategy pattern in Java
  5. 11:52Template method pattern
  6. 16:12Observer pattern skipped
  7. 16:34Tax calculation with decorators
  8. 23:49Function composition for taxes
  9. 24:09Chain of responsibility
  10. 35:48Interpreter pattern in RPN
  11. 41:10Visitor pattern for geometry
  12. 49:23Summary and conclusions
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.