DEV Community

Discussion on: What Does C++ Do That Rust Doesn't?

 
deciduously profile image
Ben Lovy

In terms of lines of code, it's one line shorter.

That's not necessarily what I'm getting at in terms of programmer ergonomics, but it is an interesting observation, thanks for pointing that out. I think it will take me a little longer to find an example to illustrate the mismatch here in functionality.

Runtime?

My turn to pull the half-asleep card - definitely didn't mean runtime, just successful instantiation. Control flow advances to the offending method call with an object that will not succeed, and the equivalent Rust kicked out the error at object creation itself.