Rust has many container-like objects that may or may contain a value, like Box. Most of these have an unwrap() method that either obtains the inner value or panics the whole application.
Box is a bad example; it always has a value and can’t be unwrapped. It’s Result<T> and Option<T> that are the primary wrappers.
Result is for Errors, and Option is for nullables. If you consider it that way, the “issues” with unwrap are identical to other languages when errors and nulls aren’t properly handled.
can you explain the joke, i work at cloudflare
Rust has many container-like objects that may or may contain a value, like Box. Most of these have an unwrap() method that either obtains the inner value or panics the whole application.
Box is a bad example; it always has a value and can’t be unwrapped. It’s Result<T> and Option<T> that are the primary wrappers.
Result is for Errors, and Option is for nullables. If you consider it that way, the “issues” with unwrap are identical to other languages when errors and nulls aren’t properly handled.
I reckon the person you’re replying to knows exactly what unwrap is, because the last big famous Cloudflare outage was caused by it. They were making a joke of their own