ADSP: Algorithms + Data Structures = Programs cover image

Episode 102: Rust scan (vs C++ & Haskell scans)

ADSP: Algorithms + Data Structures = Programs

00:00

C++ - Can You Just Call Extend on This Scan?

Rust is moved by default, so if you're not ever taking a reference or a mutable reference, you're always destroying it. The scan returned a scanned object, the reverse return to reverse object, and extend didn't work on any of those. So I ended up... What we were trying to do initially was take the result of our scan to three in our use case, and then somehow insert to the front, or insert to the end, and rotate it. That wasn't even working for any of the cases because you couldn't call extend on any of the objects that we were getting back. My next strategy is to create two different iterators, one from just the first element

Play episode from 18:32
Transcript

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