~/talk

G o F Patterns

Talkat Voxxed Days CERN 2017 · on Saturday, 2017-02-25· [java]
slides:none on file

Argues that many GoF behavioral patterns are workarounds for missing higher order functions and rewrites them with Java 8 lambdas and the Stream API and Optional. Builds runnable examples: command as Runnable lambdas, template as a loan pattern taking a Consumer, decorator as function composition, chain of responsibility via streaming Optional results, interpreter using a map of binary operators (example RPN run yields 12). All functional versions produce the same outputs and simplify control flow and resource management.

AI-written summary · about

  1. 0:00Introduction
  2. 0:48OO design patterns critique
  3. 3:40Command pattern rewritten
  4. 7:38Internal vs external iteration
  5. 12:53Strategy pattern functionally
  6. 13:35Template pattern with lambdas
  7. 17:53Observer as functional consumer
  8. 18:15Decorator with function composition
  9. 23:21Tax calculation chaining
  10. 27:00Chain of Responsibility functionally
  11. 36:58Interpreter pattern for reverse Polish notation
  12. 42:30Visitor replaced by pattern matching
  13. 49:09Q&A
~/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.