Is Maybe an Option (for modelling your domain)?
summary
Shows that F# option/maybe makes absence explicit but not why a value is missing, and that replacing scattershot nulls with algebraic sum types (like a custom Registration union and a Result type with Ok/Error) captures domain reasons, prevents illegal combinations (course level + speciality mismatches), and models UI states (NotAsked/Loading/Result/Error) so the compiler rejects invalid states and runtime null checks and racey UI “zero then spinner” bugs disappear.
AI-written summary · about
chapters (24)
- 0:00Introduction
- 1:28Who are you
- 2:10What can you expect
- 2:37Who has seen CSharp
- 3:57CSharp Code
- 4:30Repository
- 5:33Partiality
- 6:23Uncertainty
- 8:17Is there help
- 9:00Option type
- 9:38Option type partiality
- 14:39Exception syntax
- 15:15Result syntax
- 16:12Explicit options
- 17:30Option bears no meaning
- 18:42Multiple options
- 20:04Maybe
- 21:58Some Type
- 22:54Product Type
- 23:44Registration Result
- 24:59In Case Course
- 33:14Antipatterns
- 36:35Exceptions
- 39:20Conclusion
related talks
49mDomain Modeling Made Functional
52mDomain Modeling Made Functional
46mDomain modelling made simple: Functions and Values
42mA taste of functional programming with F#
43mWrite your own domain specific language with F#
59mDo or don’t There’s no try Or is there The power of monads explained Sort of
02h 41mCategory Theory: You Already Know It
38mThinking Less with Scala
