Hacker News new | past | comments | ask | show | jobs | submit login

In a for-in-range loop, the variables are read-only inside the loop body, so there is no way to skip this.

I do agree that there are reasons to modify the iteration variable in a C-style for loop, so I am surprised that those loops are being modified as well. C#, which went through a similar change, did NOT apply such a change for those for loops.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: