Skip to content
0:00 / 0:00

#rust#c++#memorysafety

Rust for C++ developers - What you need to know to get rolling with crates - Pavel Yosifovich

NDC Conferences

230K subscribers • 115 videos on Hallway • Conference channel

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • A classic. People kept recommending it from 2019 to 2023.
  • Presented by Pavel Yosifovich, consultant and author

Intermediate. Assumes working knowledge.

63K views7 years ago2 recommendations

Programming languagesSystems programmingRustC++Concurrency and parallelism

Pavel Yosifovich introduces Rust to C++ developers, contrasting the two languages and explaining Rust's ownership model and memory safety.

The session is about using the Rust language to write safe, concurrent and elegant code, contrasting with C++. Check out more of our talks in the following links! NDC Conferences ndcoslo.com ndcconferences.com

Why it's here

2 people recommend this

What people say. Recommended for C++ developers looking to understand Rust's memory safety, borrowing, and ownership concepts.

u/MightyChubzin r/rust • Recommends

On “Coworker: "Rust doesn't offer anything C++ doesn't already have"”

Built-in memory safety. Ownership model and borrow checker ensures that your values aren't being thrown around all over the place. Example: https://pastebin.com/w1dtmxbc This program won't compile becuase you are using an immutable variable while there's a mutable variable in the same scope. This is something the C++ compiler doesn't check for, but this feature ensures safety. What if you modify 'y' and then read from 'z' expecting the previous value? Something else that is also amazing in Rust is the multithreading. It is much easier to keep an eye on who's accessing what, instead of using the 'mutex' keyword in C++. There is a full talk about this here: link to this video

u/rodrigopandiniin r/rust • Recommends

On “Examples of C++ vs. Rust code for a presentation”

I think that if you show problems like Use after free, Dangling pointer, and other common memory problems that Rust try to sove using the borrowing and ownership concepts is a good start to introduce the language. There are a couple of videos where you can find some code examples comparison and languages features differences. Links below: link to this video link to this video link to this video link to this video link to this video