Comment Re: Full Parity with C (Score 1) 111
It's not about your code not sucking though. It's about you having to repeat the same hundred lines of buffer management code over and over again, and one day you make a tiny mistake. Not in logic flow, not in interop with external systems, but in blocking out memory for a string function. So incredibly basic an operation that the compiler should be able to do it for you, especially since in Rust it *does*. If "your code just shouldn't suck" is an argument, why are you writing C and not assembly?
Also, even if you never actually use the foot-guns, the language being safe can have other benefits too - in many scenarios Rust is faster than C. It was explained to me like this: a pro tennis player can hit the ball at a hundred miles an hour, but that is nothing special; anyone can do that. It'll just end up out of bounds, though. We hit slower because we need to hit at speeds we can control the ball at. A tennis player can *control* the ball at a hundred miles an hour. Similarly, since the Rust compiler knows that nothing weird can possibly happen in safe code, and because it doesn't need to specify the memory layout of anything by default, it can make all sorts of crazy optimizations if it wants to, and does. Move array of structs to struct of arrays, pass by value instead of by reference of vice versa, etc. C can never be this optimized for the same reason JNI is a huge slowdown: for all you can *try* to keep it safe, anything can still modify anything at any time, and when a potentially unsafe operation is severely restricted in how it can be optimized around in Rust, *every* operation is an unsafe operation in C.