4 ms·
The nice part about Rust is that if you don't want to use a given feature, you can just ignore it. You can totally write Rust in a struct + functions style, jus
by Ar-Curunir 7y ago
The nice part about Rust is that if you don't want to use a given feature, you can just ignore it. You can totally write Rust in a struct + functions style, just like C.
If you want higher level abstraction only in some parts of your codebase, you can do that too. It's easy to mix-and-match.
- pron 7y agoRight, like C++.
- Ar-Curunir 7y agoSure, but you still get memory safety.
- pron 7y ago... hence a better C++. If a better C++ is what you want, then Rust is a great fit.
- ncmncm 7y agoIn 1995 people said Java was a "better C++", but it was basically 1991 C++ plus GC (and numerous misunderstandings), minus concrete types. Rust can do more of the things C++ can do than Java can, but there is a very great deal that can be put in a C++ library that is wholly beyond Rust's capacity. If you have lesser expectations to capture semantics in libraries, or to use such libraries that do, Rust serves. But the gap will only grow wider.
- wtetzner 7y ago> but there is a very great deal that can be put in a C++ library that is wholly beyond Rust's capacity. Just out of curiosity, do you have some examples?
- ncmncm 7y agoThe easy examples involve operator overloading. Some more subtle would involve template dispatching according to properties of the types operated on. But just run down the list of features supported in C++, and not in Rust, and think about how they could change how a library interface or implemention would look. Most C++ features are meant for people writing libraries.
- iopq 7y agoRust has limited operator overloading. You can do common operations like arithmetic, but you can't define symbol soup