~/talk

Better Together: Rust & TypeScript

Talkat JSHeroes 2024 · 2024-05-23..05-24· [rust, typescript]
slides:none on file

Argues that specific Rust ideas improve TypeScript by showing working code: a real "friends of user" refactor, a hand-rolled Result-style error type in TypeScript, and comparisons to Go returning value plus error. Demonstrates that treating errors as first-class alternative paths prevents whole-site crashes, eases retry logic, and makes tests simpler. Recommends strict TS config, composition over inheritance via traits-like composition, and favoring pure functions to make large JS codebases more maintainable.

AI-written summary · about

  1. 0:00Introduction
  2. 1:03Talk expectations
  3. 2:29JavaScript with types
  4. 3:40C++ vs JavaScript errors
  5. 5:27Go error handling
  6. 6:30Rust Result type
  7. 8:43Errors as equal paths
  8. 9:26Rust patterns in TypeScript
  9. 11:16Strict mode & type safety
  10. 12:40Traits vs inheritance
  11. 13:43Functional composition in Rust
  12. 15:34Pure functions
  13. 17:25Testing pure functions
  14. 17:47Rust for maintainability
  15. 18:30Rust vs JavaScript
  16. 18:53Key takeaways
~/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.