~/talk

Defense Against The Wrong Logic: Proactive Rust Coding

Talkat Rust Latam 2019 · 2019-03-29..03-30· [rust]
links:none on file
slides:none on file

Shows concrete moves: use newtype wrappers with the Into trait to make a Celsius→Fahrenheit conversion that actually fails to compile if you mix units, build a GitHub client with the Builder pattern so invalid request states are unrepresentable, parse inputs early with serde_json (or nom / pest) into typed responses, prefer assertions and labeled expect messages over blind unwraps, and minimize and document unsafe blocks (one-line scopes, unsafe functions with invariants). These patterns aim to catch logic errors at compile or parse time and reduce 3am on‑call wakeups.

AI-written summary · about

  1. 0:00Intro
  2. 1:16New types
  3. 1:54Type alias
  4. 6:43Builder Pattern
  5. 10:28Converting Input
  6. 16:49Unwrap Expect
  7. 21:13Unsafe
  8. 24:10Guidelines
  9. 29:58Outro
~/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.