~/talk

Data Oriented Programming and Matching in Java

Talkat Devnexus 2023 · 2023-04-04..04-06· [java]
github:malagupta
slides:none on file

Modern Java uses records to model immutable tuples with auto-generated toString/equals/hashCode, sealed classes to declare exhaustive finite hierarchies so the compiler enforces switch exhaustiveness, and pattern matching (instanceof, switch, record patterns) to extract components without boilerplate. Examples show CSV and JSON rows mapped to record types, ADT-like shape hierarchies, and a reimagined Option class. Records suit multi-threaded value objects but fail for mutable ORM entities; overall the features shrink code, lower cognitive load, and simplify validation and parsing.

AI-written summary · about

  1. 0:00Intro
  2. 0:48Model data as data 2. Reduced complexity, improved efficiency 3. Simplified data access and manipulation
  3. 1:492. Sealed classes 3. Pattern Matching
  4. 3:411. Complex return types of a method need to be deciphered using rules 2. Structure of string data 3. Specifications (like JSON)
  5. 5:52Semantics - quite dangerous, carnivore 3. Application - Pet to scare away enemies, Don't leave your pets near it run for your life if you see it
  6. 8:49Automatic accessor methods 4.toString(), hashCode() and equals() 5. Compact and canonical constructors 6. Add annotations to record components 7. Create generic records 8. Additional instance variables - not okay 9. Additional static variables - not okay
  7. 10:34Prefer use in multithreaded applications 3. Can't be used with frameworks that changes record values later 4. Ease of use with collection framework
  8. 17:21Does this object match a Pattern?
  9. 18:31Pattern matching for instanceOf
  10. 22:27Switch expressions and Record Patterns
  11. 24:26Examples of Data Oriented Programming
  12. 28:02Expressive hierarchical structures
~/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.