
3·
4 months agoAt least the rumor at the time was that these things suffered from a physical “virus.”
If you ever put a damaged Zip disk in your drive, it would damage the drive (the click of death). That drive would then damage any Zip disk you put in it, spreading the virus.
To this day I don’t know if that’s actually true, but everyone believed it.
Practically yes, but also no. The C pointer aliasing rules limit the optimizations the compiler can apply, since any
int *might point to anyintin scope. It’s even worse than that in the Linux kernel: since it has to be compiled with-fno-strict-aliasing, the compiler has to assume that any pointer can alias any variable in scope.In contrast, Rust simply disallows aliases to mutable variables and the compiler prevents them in safe code (you can write them in unsafe code but it’s instantly undefined behavior, which is why unsafe Rust is harder to write than C). Every variable that can change has one and only one name. This can sometimes allow the Rust compiler to optimize in ways that wouldn’t be possible in C.
But in practice the impact of this is pretty close to nil as long as you write smallish functions.