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

If that quote from the article was supposed to be comparing C++ positively to rust, honestly it comes off as pretty condescending to me, too.

Just because Rust has some safety rails built into it, that doesn't mean it hides the nature of what's going on underneath from you, any more than using a static analyzer on C++ would. Rust isn't any higher level than C++, and you still need to deal with all of the same requirements and underlying concepts and semantics in writing safe code in Rust as C++, it just forces them explicitly ahead of time and does so in an extremely clear manner, whereas C++ "enforces" them at runtime as they arise and in an extremely opaque manner. That's basically the only difference, and in fact, because Rust explicitly and clearly forces you to contend with the concepts of single ownership and proper RAII and when to use which pointer type and the basic practices of avoiding data races and memory safety violations from the get-go in a way that C++ does not, if anything Rust forces you to learn to do everything correctly and grok all the concepts behind it up front far more rigorously than C++ ever would, since in C++ you can kind of skirt by ignoring all of it.

And as a testament to this, I have found in casually branching out and reading up on C++ (despite how much of a fan of Rust I am, and the fact that I think Rust is genuinely the future and should probably eventually take over C++'s position for any new projects, I really think that C++ is a very cool language, with some absolutely killer features, and I can absolutely see why those who enjoy programming in it do so, and I actually think I would enjoy programming in it too) that my experience with Rust and Rust's concepts actually makes C++ infinitely easier to understand, because the underlying concepts and implementation of everything is pretty damn similar, which I think should indicate that Rust does in fact encourage you to learn the underlying concepts of things. I've also found that knowing Rust makes my C code infinitely better, because I've got a borrow checker in my head now.



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

Search: