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

I think your arguments would be much stronger with some actual code samples.

Usually, when the same code can be written either as range-based "for" or as a "while", the "for" will look better and have fewer possibility of bugs. If you have examples otherwise, I'd like to see them.

(Note I am specifically talking about range-based/iterator-based "for", not the C's variant. Nor am I talking the cases where the "for" is hard to use, like when the size might change at runtime)



Let's leave it there mate.

You're not the OP, you/me we're only guessing what he/she might've meant.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: