Hacker News new | ask | show | jobs
by alvarelle 2022 days ago
> in rust as long as you don't use a feature you don't need to know about it.

Is that not the same in C++ and in most languages?

... until someone else in your team uses it in your code base. And then you need to know about it in Rust as well.

1 comments

The difference is that with rusts safety you can to some degree "try thinks out". Which doesn't work with C++ as you might have hidden UB.

Also C++ has a bunch of "hidden" features and unexpected interactions with other features and UB like e.g. forward guarantee because of which `while(1);` is UB.