3 ms·
I think Rust really has a chance replacing C++. To me it's in the sweet spot between C and C++: it fixes all the tedious little things in C, but still feels lik
by pornel 12y ago
I think Rust really has a chance replacing C++. To me it's in the sweet spot between C and C++: it fixes all the tedious little things in C, but still feels like a "small" language (everything is a combination of struct/enum/function) and still is very low-level.
It has no GC and zero overhead like C++. You control stack vs heap allocations and memory layout. With `unsafe` blocks it allows all kinds of crazy optimisations when you need them.
When you compile with link-time optimizations most of Rust stdlib is discarded so you can have reasonably small executables.
Rust doesn't rely on a big runtime and has first-class C interoperability, so you can use it for plugins/libraries with C API too.
And since Rust is pretty similar to Swift (except without reference counting and with saner array references ;) I expect LLVM will soon be optimized for that kind of language, so Rust's performance will be >= C++.