~/talk

Strings are Evil: Methods to hide the use of primitive types

Talkat Scala Days Berlin 2018 · 2018-05-14..05-17· [software-architecture]
slides:none on file

Primitive primitives like Int and String cause bugs by allowing invalid domain values; concrete remedies shown include a simple type alias, a case class with a sealed abstract case class wrapper and private constructor to prevent invalid copies, the external library refined which checks literals at compile time and returns Either at runtime for dynamic input, and the upcoming opaque types (SIP) that promise zero runtime overhead; examples include UUIDs validated to 32 hex digits and nonempty strings, and tradeoffs are measured (compile-time checks vs runtime Either and adoption complexity).

AI-written summary · about

  1. 0:00Start
  2. 0:29Outline
  3. 4:49Time Zones
  4. 11:04Runtime Overhead
  5. 11:58Make the Constructor Private
  6. 13:52Sealed Abstract Case Class Uid
  7. 16:34Functions
  8. 25:36Opaque Types
  9. 28:08Summary
  10. 29:46Refinement Types
~/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.