Hacker News new | past | comments | ask | show | jobs | submit login

>I feel like I'm relearning C++

Because you are. You likely wrote widly unsafe things which are perfectly legal in C++. Rust is really just enforcing RAII which C++14 already has, and you've likely avoided.




C++has had RAII for decades already. Actual Rust innovations are the borrow checker and dynamically sized types.


Yes, we were already using it on Windows to program COM in the mid-90's.


The borrow checker is predated by Cyclone and other work on region systems. Rust added more polish, but none of the basic ideas are new.


Of course, I'm aware that work on region systems dates back to the mid 90's, which is why I called Rust's borrow checker an “innovation” (the first time a product form factor or feature successfully makes it into a market) rather than an “invention” (coming up with a product concept that didn't exist before).


Wait, people avoid RAII? With how useful it is in every circumstance, I can't imagine C++ without it.


It's not just the safety features; it's the syntax, the build system, the numerous kinds of strings, the difficulty of finding up-to-date documentation, etc. Rust just has a steeper learning curve than many newer languages. This is not to say that the learning curve is unjustified; only that it exists and is significant.


Regarding safety, we don't even need to call into question my competence with writing safe code :) ; Rust's borrow checker currently precludes a swath of perfectly safe programs. This isn't a knock on Rust; it just means it's not yet intuitive.




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

Search: