~/talk

Idiomatic Scala Your Options Do Not Match

Talkat LambdaConf 2015 · 2015-05-22..05-24· [developer-experience]
speakerdeck:marconilanna
slides:none on file

Claims that Option is best used as a collection/monad via map, flatMap, filter, fold and many built-in methods rather than pattern matching, demonstrates fold is more type-safe than naive pattern matches, and enumerates practical tools (map, getOrElse, fold, exists, forAll, count, toSeq/toList/toSet, toRight/toLeft, contains) with examples and tests. Shows a refactor where changing Option to Seq requires no method changes and thus saves work, uses small code samples and a test helper to prove behavior, and everything runs as advertised.

AI-written summary · about

  1. 0:00Start
  2. 3:12Pattern Matching
  3. 5:00Type Mismatch Error
  4. 22:40Abusing Pattern Matching
~/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.