4 ms·
The first link notes that they don’t plan to change the semantics of the range loop, but they might dis-allow referencing it which is… uhh ok maybe? But go is
by shp0ngle 4y ago
The first link notes that they don’t plan to change the semantics of the range loop, but they might dis-allow referencing it
which is… uhh ok maybe?
But go is really trying to keep backwards compatibility so they won’t just change this
- masklinn 4y agoBoth changes break BC though. I see the underlying divergence of opinion as one of signalling: changing loop semantics would silently change code behaviour, even if it should usually be for the better there’s a bit of an 1172, whereas making the loop variable non-reference-able noisily breaks code which is almost guaranteed to be incorrect.