I don’t think other languages merely doing the same thing is a sufficient justification. What if all three are copying the same mistake from each other?
I see that Python would prefer more flexibility and convenience rather than robustness, but from Rust I expect more reliability.
In image processing I have things like:
let image3 = image1.zip(image2).map(|(a,b)| a+b).collect();
and when image1 has a different stride than image2, I get a garbage result, and maybe an out of bounds error somewhere later due to the unexpected truncation. That’s unusual for Rust, because in other cases it catches most of my errors quite reliably and early.
I’ve started this thread after seeing a discussion on Twitter about Intel’s AMT vulnerability, which was caused by a similarly unexpected early termination in strncmp. Rust’s equivalent of that would be:
computed_response.zip(user_response).all(|(c,u)| c==u)
For basic string comparison Rust of course has ==, but if one wanted to implement any fancier comparison (constant-time, case-insensitive), they’d probably use .zip() and risk that mistake.