~/talk

OOP vs. DOP: Which One to Choose?

Talkat IntelliJ IDEA Conf 2025 · 2025-06-03..06-04· [java]
slides:none on file

Argues that for a concrete order/trade example the Java features replace clumsy visitor/factory plumbing: a processTrade that audits buys when quantity > 5,000 and sells when quantity > 10,000 moves from interface+auditor classes to a concise switch with pattern matching in switch, using sealed interfaces and records and destructuring. The prototype runs, gives faster compile‑time feedback on new types, reduces accidental complexity, but intentionally violates Open/Closed as a documented tradeoff.

AI-written summary · about

  1. 0:00Introduction
  2. 0:42OOP pillars explained
  3. 5:00Polymorphism in payments
  4. 16:16Challenges with patterns
  5. 25:17Simplifying code with pattern matching
  6. 37:35Sealed classes for safety
  7. 44:30Destructuring records in Java
  8. 51:37OOP versus DOP tradeoffs
  9. 57:20Choosing the right tool
  10. 59:48Conclusion
~/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.