3 ms·
One small point I disagree with is characterizing using iteration to avoid bounds checks as "wrestling with your environment". At least for most developers, it
by gameswithgo 5y ago
One small point I disagree with is characterizing using iteration to avoid bounds checks as "wrestling with your environment". At least for most developers, iterating instead of writing for loops by hand is the more natural approach, and I really like that Rust makes the way people WANT to write code the fastest path. Contrast with C# or Javascript where using iterators has performance overhead. So you have to ask yourself (in some domains) if the iterator is worth the overhead. In Rust you just use the iterator any time you can!
However I can see how people coming from C might consider the for loop the more natural approach.