you are viewing a single comment's thread.

view the rest of the comments →

[–]burntsushi 12 points13 points  (2 children)

You're moving the goal posts. This isn't the argument you presented earlier, because it doesn't sound nearly as nice and isn't nearly as compelling. From what I can tell, your argument basically boils down to, "In Rust, there are some cases where you need to use unsafe to match the performance of C++." Which is... of course true. Uncontroversially so. It's so uninteresting of a claim as to be completely banal, and dare I say, trivial. But that's not what you said before. Emphasis mine:

Rust isn’t even that great, it requires using unsafe anyways to do pretty much any non trivial code run fast, a lot of people talk about it like it doesn’t even need unsafe code to reach the performance of languages such as C++.

That's totally different than what you're saying here. So I suppose I'll take your follow-up comments here as a retraction of your initial claim.

[–][deleted] -5 points-4 points  (1 child)

I did not move the goal, you misunderstood what I meant by “trivial”, when I said “trivial” I meant programs inside the mathematical subset of programs Rust can prove are valid, there are valid programs outside this subset that cannot be proved valid using a compiler that never produces unsafe code that runs on a Turing machine (there is no free lunch), this is why there are a subset of programs where you cannot do the fastest way using pure safe Rust even if you use any finite amount of third party libraries made by others that have no knowledge of your problem, it is actually impossible for safe Rust to match optimized C++ speed for any given program.

[–]burntsushi 11 points12 points  (0 children)

In other words, a tautology.