~/talk

Boolean Blindness Explained for Beginners in Haskell

Talkat LambdaConf 2019 · 2019-06-05..06-07· [typescript]
links:none on file
slides:none on file

Argues that Booleans are an information-poor type and shows concrete fixes in Haskell: replace Boolean flags with pattern matching, custom ADTs or Maybe/Either return types to make functions total, pass decision logic as functions instead of flags, and compose predicates with a fold using the reverse bind to short‑circuit. Examples include a safer list append, turning a partial lookup into a Maybe result, and a scalable validate pipeline; the compiler then prevents the common mistakes described.

AI-written summary · about

  1. 0:00Intro
  2. 2:38Information Poverty
  3. 3:35Common Anti-pattern
  4. 3:57List Append
  5. 5:36What are the problems?
  6. 5:52Partial Functions
  7. 9:11Higher-Kinded Types
  8. 9:41Maybe as a Return Type
  9. 11:01Principle
  10. 12:56Example
  11. 14:13Solution (Kind Of)
  12. 14:33Algebraic Data Types
  13. 17:49Input Validation
  14. 18:14Replace First Flag
  15. 18:50Replace Second Flag
  16. 19:51Maybe as Return Type
  17. 21:25The Right Section of
  18. 21:57A Scalable Version
  19. 22:30Helper Function
  20. 23:35A Better Helper
  21. 24:14Let's Use a Monad
  22. 25:53Reverse Bind for Maybe
  23. 26:18Using a Monad Instance
  24. 27:43Data Flow
  25. 28:57Pretty Cool?
  26. 29:34Summary
  27. 35:02First Try At Refactoring
~/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.