News for hackers. Stuff that matters.
Re:Push ifs up and fors down by scns on Thursday November 16, 2023 @05:03AM (#38287652)
> The "enforce preconditions via types" is a common pattern in Rust

Called the Type State Pattern. Here are two links from my bookmarks:

https://cliffle.com/blog/rust-typestate/

https://yoric.github.io/post/rust-typestate/

There are no comments on this comment yet.