4min chapter

 Rustacean Station  cover image

Rust for Rustaceans by Jon Gjengset

Rustacean Station

CHAPTER

Object Oriented Programming

Rust is a much more intuitive programming model than object oriented programming ever was to me um like it makes sense to me that you have things and then you have behaviors that those things can have. The two are sort of separate and that's what you get with types and traits in Rust. I think they are disconnected whereas objectoriented tends to lead to this like inheritance hierarchy that doesn't always make sense. There might be hundreds of traits in your dependency tree that have a method called foo and you need to tell the compiler which one we're talking about. So instead of like dotfoo you write like this trait colon colon Foo and you pass in the arguments but either way you need to telling the compilation

00:00

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode