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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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