News for hackers. Stuff that matters.
Re:The Path to Rust by Chris2048 on Thursday May 26, 2016 @07:40AM (#11777156)
> // iterate over our arguments

> .iter()

hmmm. Not far off the old

> i++ // add one to i

Re:The Path to Rust by tatterdemalion on Thursday May 26, 2016 @01:29PM (#11779829)
These are quite different. `.iter()` is equivalent to creating the counter and declaring both the increment and conclusion condition, only its guaranteed to correctly access each member of the collection once and to never be broken, and for many collections (e.g. arrays) it is written in a way which allows for powerful optimizations.
Re:The Path to Rust by Chris2048 on Friday May 27, 2016 @05:16AM (#11784808)
I mean in terms of comment useful-ness.