Skip to content
0:00 / 0:00

#rust#borrowchecker#typestatepattern

RustConf 2021 - Compile-Time Social Coordination by Zac Burns

Rust Programming Language

70K subscribers • 72 videos on Hallway • Conference channel

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by Zac Burns

Intermediate. Assumes working knowledge.

5.7K views5 years ago1 recommendation

Programming languagesSoftware designRustDesign patternsSoftware architecture

Zac Burns explains how to use Rust's type system and borrow checker to enforce architectural rules and conventions at compile time.

Compile-Time Social Coordination by Zac Burns You can write good code. So can I. But can we write correct code together? The hardest problem facing the ordinary developer of today is not in algorithms or frameworks. Bugs are commonly found between the lines. Projects contain rules that must be adhered to everywhere but are specified nowhere. They are conventions, tribal knowledge, and best practices. Let's learn how Rust makes it easier to write code that agrees and is consistent across files, crates, and persons. This is the story of how I stopped stepping on everyone's toes and learned to love the borrow checker.

Why it's here

1 person recommends this

What people say. Recommended as an inspiring resource on using Rust's type system and the typestate pattern for better API design.

u/didave31in r/rust • Recommends

On “Design pattern/guidelines to architecture Rust code”

Recently I came to realize the advantages of the type system and the borrow checker and that they really seem to set Rust apart from other languages. Four inspiring resources + Bonus Links: 1. Rust State Design Pattern link to this video 2. Type-Driven API Design in Rust link to this video 3. The Typestate Pattern in Rust http://cliffle.com/blog/rust-typestate/ 4. Compile-Time Social Coordination link to this video **** Bonus (Yet to read them) **** a. https://willcrichton.net/rust-api-type-patterns/introduction.html b. https://rust-lang.github.io/api-guidelines/type-safety.html c. https://rust-unofficial.github.io/patterns/patterns/behavioural/newtype.html d. https://doc.rust-lang.org/embedded-book/static-guara…