~/talk

Goodbye Boilerplate: The Visitor Pattern Reimagined in Modern Java

Talkat XtremeJ 2025 · on Tuesday, 2025-11-25· [java, compilers-and-language-design]
slides:none on file

Replaces classic visitor boilerplate with a single evaluate method over a sealed Expression AST (Number, Total, Difference, Multiplication) using pattern matching in switch expressions; records eliminate manual data methods and sealed types guarantee exhaustiveness so no missing-case bugs. Claims elimination of double dispatch, fewer lines of code, and measurable JVM speedups from switch optimizations. Provides runnable examples that build an evaluator, recursively compute expressions, and demonstrate that the approach works and is easier to maintain.

AI-written summary · about

  1. 0:00Introduction to talk
  2. 1:21Problem visitor pattern solves
  3. 4:39Traditional visitor implementation
  4. 11:10Modern visitor with records
  5. 19:31Benefits of modern approach
  6. 21:17Conclusion and thanks
~/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.