Algorithms + Data Structures = Programs cover image

Episode 107: Jane Losare-Lusby on Rust! (Part 2)

Algorithms + Data Structures = Programs

00:00

How Do You Write Traits in C++?

The way that it's done in C++ I find very quirky. In Ross instead of describing what the type needs to conform to you it's kind of like an abstract class sort of thing like you're describing the interface. And when you implement it you implement that interface within the ample block of the trait. So for like normally if you're if you're defining a free function for a type you like open up a block that's like simple type and then open open block. Within that is where your functions go and you can like have a self as we have when your parameters are going to refer to type, etc.

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app