Better Together: Rust & TypeScript
summary
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
chapters (16)
- 0:00Introduction
- 1:03Talk expectations
- 2:29JavaScript with types
- 3:40C++ vs JavaScript errors
- 5:27Go error handling
- 6:30Rust Result type
- 8:43Errors as equal paths
- 9:26Rust patterns in TypeScript
- 11:16Strict mode & type safety
- 12:40Traits vs inheritance
- 13:43Functional composition in Rust
- 15:34Pure functions
- 17:25Testing pure functions
- 17:47Rust for maintainability
- 18:30Rust vs JavaScript
- 18:53Key takeaways
related talks
30mRust-Inspired Typescript
11mThe Joy of Typescript
27mMatthew Gerstman - TypeScript: Seeing Past the Hype
26mChoosing TypeScript Matters More Than Ever
12mHow TypeScript Ruined My Life (In a Good Way)
40mTypeScript and Your Codebase: They Deserve Each Other!
38mMaking Rust Delightful
26mThe Freedom of Static Typing
