~/talk

Let the Compiler Help You: How to Make the Most of Scala's Type System

TalkinGermanat Scala.IO 2017 · 2017-11-02..11-03· [typescript]
links:none on file
slides:none on file

Shows practical Scala techniques to make the type system catch real bugs: use smart constructors and private companion constructors to prevent invalid values, wrap failures in Option instead of throwing, and encode invariants with small predicate types like nonEmpty, positive, or validEmail. Demonstrates using macros for validation to move checks to compile time where possible, and gives examples of which runtime checks disappear, what the compiler can and cannot prove, and when macros or runtime validation are still needed.

AI-written summary · about

  1. 0:00Scala's type system
  2. 10:02Compiler needs help
  3. 17:05Email inputs with Option
  4. 23:06Smart constructors
  5. 33:14State transitions with types
  6. 39:02Q&A
~/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.