~/talk

9 Java Patterns that Kotlin made obsolete

Talkat Voxxed Days Zürich 2022 · 2022-05-17..05-19· [kotlin]
links:none on file
slides:none on file

Nine specific Java patterns get replaced by Kotlin language features with concrete examples and results: nullable types remove Optional for returns/params/props with compiler enforcement; default and named arguments replace overload proliferation; extension functions and properties replace util classes; objects replace singletons with thread‑safe lazy init; Kotlin DSLs (example: Spring MockMvc Kotlin DSL) and operator/compareTo functions simplify builders, iterators and comparators; interface delegation replaces strategy boilerplate. Each pattern shows fewer lines, less error‑prone code and working, readable replacements.

AI-written summary · about

  1. 0:00Start
  2. 3:33The nullable types are mightier than the Optional
  3. 5:13Use default/named arguments not overloading!
  4. 6:48Extend classes with extension functions/properties not utils!
  5. 8:15Prefer functions to classes! Whenever possible
  6. 9:39Never write Singletons! Only ever use objects.
  7. 12:40Don't be afraid of DSLS. Learn to love them.
  8. 14:25Use operator functions.
  9. 15:43Think of the reader not the writer.
  10. 16:09Strategy
~/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.