If you mean historically, then yes, but I don't think there is an inherent reason why we couldn't have a language as convenient as Python and fast as C.
In order to get conciseness, you need to accept defaults that work for everyone. Those defaults might not be that great for you, but they're good enough.
In order to get performance, those "good enough defaults" are suddenly no longer good enough, and now you need to get very specific with what you're doing.
Maybe with a smart enough compiler, a high-level language could be compiled to something with very good performance, but the promise of that "sufficiently smart compiler" has yet to be fulfilled.
For one, Rust's unwrapping of values is done in one step, as opposed to a "check first, unwrap second".
Or this: This makes it so you can't check something and unwrap something else.Second, for pulling out errors, you would usually use a match statement:
Or: This makes it so that you can't invert the check. As in, you can't accidentally check that it's an Err value and then use it as an Ok, because its inner value won't be in scope.You also can't use an Ok value as an Err one beyond its scope, because the scope of the error and the scope of the good value are a lot more limited by how if let and match work.
What the C++ code is doing is repeatedly calling `value.unwrap()` or `value.unwrap_err()` everywhere, pinky-promising that the check for it has been done correctly above. There's some clever checks on the C++ side to make this blow up in bad cases, but they weren't enough.