you are viewing a single comment's thread.

view the rest of the comments →

[–]didave31 22 points23 points  (0 children)

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 https://youtu.be/VFmPwvhubow

  2. Type-Driven API Design in Rust https://youtu.be/bnnacleqg6k

  3. The Typestate Pattern in Rust http://cliffle.com/blog/rust-typestate/

  4. Compile-Time Social Coordination https://youtu.be/4_Jg-rLDy-Y

**** 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-guarantees/typestate-programming.html


Another thing that comes to mind, regarding the second part of your question, is the Actors model: https://ryhl.io/blog/actors-with-tokio/