Rustacean Station  cover image

Glidesort with Orson Peters

Rustacean Station

00:00

How to Implement a Panic in Rust

Rust has this thing called a panic. They're kind of similar to C++ exceptions in that you can catch them and they are what's known as unwinding exceptions or unwinding panics. In Rust, you can't say like, Oh, you panicked in your comparison operator. Well, you're not allowed to look at the array anymore. You can't do that in Rust. We have to be safe and sound always. It's essentially impossible to write almost any sorting algorithm without unsafe code.

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