1,163 karma · joined November 10, 2020
If you mean things that formally create a data race, then C++ cannot do that either.
But, of course, there is still a lot of new C++ code written, more than Rust. I believe C++ will become legacy, but it's not there yet and even once that happens it'll take at least decades to stop writing C++.
> To make it fast you need simd, which implied using unsafe
Is just false. There are multiple safe SIMD libraries for Rust that can exploit the full SIMD potential. Only very rarely they require unsafe for maximum performance and only to avoid bound checks.
So the conclusion is not necessarily "don't buy ESP", but "verify what you're actually buying".
It already is implemented, I believe. The thing I wondered is how NativeAOT could be faster, which is what GP claimed.
(Also, practically it should be slower because NativeAOT is based on the JIT and the JIT is worse at optimizing than LLVM).
I'm very curious to hear when? Because even the people that argue managed languages can be faster than unmanaged, say it because the JIT has better information at runtime. But NativeAOT cannot be better (and will be worse) than LLVM with PGO.
Not everything, no. You can't run C# without the .NET runtime. Some parts of it are irreplaceable.
And the Rust optimizations to shrink binary size (see https://github.com/johnthagen/min-sized-rust) are commonly done in production when it matters, not just in WASM but also in embedded.
The comparison is unfair for other reasons (the C# runtime was optimized for WASM size and the Rust not, it's possible to be much smaller in Rust), but it's still cool.
If you only tell them to find issues in PHP - the strongest models probably still can, although they might find different issues ;)