Implementing an Object-Oriented Design Pattern – The Rust Programming Language

Slowly working my way through this book, and my mind keeps getting bent.

«By implementing the state pattern exactly as it’s defined for object-oriented languages, we’re not taking as full advantage of Rust’s strengths as we could. Let’s look at some changes we can make to the blog crate that can make invalid states and transitions into compile time errors.»

https://doc.rust-lang.org/book/ch17-03-oo-design-patterns.html

Oh, btw:

https://www.digitalocean.com/community/tutorials/gangs-of-four-gof-design-patterns

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.