|
|
|
|
|
by AlotOfReading
897 days ago
|
|
Rust gives you useful and important properties that C++ doesn't. For example, you can look at a piece of rust code and by following very simple rules verify that there's no UB in that code. You can't do the same in C++. Also, the interop story with rust is equal or better than C++ in many areas at this point. Aside from tools like bindgen eliminating entire families of footguns, try doing something like registering a member function to a c callback, the way virtually every driver works. The rust equivalent in the extremely immature kernel dev trees are a bit ugly, but already much simpler than the idiomatic C++ equivalents. For additional fun, try and do it safely with a custom allocator or closures in a modern version. |
|