Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> If I can avoid an index variable, I’m going to have less bugs since I won’t have to index.

Not only that. In safe Rust vector indexes are always bound-checked that slows execution a little bit. Iterators over a vector, on the other hand, do not suffer from bound-check overhead.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: