Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> The core of most arguments against C++ boil down to those two points too. If a large percentage of the engineers working in the language have a problem understanding it, they are going to have a hard time proving that their aren't any unexpected side effects.

That's true for C++ but not for Rust, because Rust will tell you if there's some kind of unexpected behaviour that you didn't think about, whereas C++ will allow UB or whatever without telling you.

That's the big difference between (safe) Rust's complexity and C++'s complexity. They are both very complex, but in Rust it doesn't matter too much if you don't memorise the complexity (complicated lifetime rules, etc.) because it will just result in a compile error. Whereas in C++ you have to remember the rule of 3... no 5... etc. (that's a really simple example; don't think "I know the rule of 5; C++ is easy!").



Not in unsafe code blocks, and plenty of people reach to them, even for stuff they shouldn't, like fake dependent types in Rust.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: