~/talk

A Hitchhiker's Guide to the Functional Exception Handling in Java

Talkat JDD 2017 · 2017-10-03..10-04· [java, functional-programming]
slides:none on file

Shows how Java borrows functional patterns to replace try/catch with composable results: Try and Either for success/failure, Optionals for absence, flatMap to avoid nested wrappers, and left/right projections for Either. Uses the waiver library to implement these types and demonstrates they compose cleanly in real code. Notes performance: creating and filling exception stack traces can collapse throughput to near zero versus ~60K ops when reusing exceptions. Warns it doesn’t eliminate exceptions or typing overhead — use common sense.

AI-written summary · about

  1. 0:00Introduction
  2. 1:15Problems with Java exceptions
  3. 6:15Go’s error handling approach
  4. 8:44Benefits of static typing
  5. 11:14Type-driven development
  6. 12:58Introducing Try in Java
  7. 16:10Using Try as return type
  8. 18:21Producer side with Try
  9. 20:13Nested Try and flatMap
  10. 21:43Pattern matching with Try
  11. 22:46Simulating multiple returns
  12. 23:26Introducing Either
  13. 27:56Real-world Either usage
  14. 29:22Either for alternative paths
  15. 30:51Absence modeling with Optionals
  16. 32:16Overuse of exceptions in code
  17. 33:42Vavr library overview
  18. 34:25Influencing Java evolution
  19. 35:31Key takeaways
  20. 37:18Q&A session
~/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.