~/talk

Is Maybe an Option? How to Model Nothing

Talkat DDD Europe 2022 · 2022-06-20..06-24· [typescript]
slides:none on file

Null causes ambiguous states, so the code replaces it with Option/Maybe for parseWetsuitSize and repository returns, and introduces a Result type for errors; concrete scuba-diving examples show a registration return type implemented as a sum type with cases Accepted(confirmationNumber), CourseFull and WaitingList. Examples use F# and C#-style patterns; the compiler forces handling of none/ok cases and algebraic data types make illegal states unrepresentable, preventing runtime null checks and reducing domain bugs.

AI-written summary · about

  1. 0:00Introduction to modeling
  2. 1:36The problem with null
  3. 4:50Dealing with uncertainty
  4. 7:11Using the option type
  5. 11:02Error handling with results
  6. 13:51Limitations of options
  7. 17:23Algebraic data types
  8. 19:15Unrepresentable states
  9. 20:27Conclusion and takeaways
~/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.