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
Transcript
Play full episode

Remember Everything You Learn from Podcasts

Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.
App store bannerPlay store banner