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

> The reason for doing it that way, is to emphasize when two loops together are conceptually iterating over a single thing, and have some symmetry, like iterating over the cells in a 2D grid. It makes it possible to line up the elements of the two loops, emphasizing the similar structure.

I'm not convinced. Even iterating over a 2D grid, one loop is iterating over the columns, and the other the rows, and indentation (and braces) can help see which is which.



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

Search: