back

by josephcsible·5y ago·view on hn ↗
My point is that you know at the end of the while loop, it's going to test the loop variable you wrote at the beginning, no matter what's in the loop body. The fact that other things could change the variable isn't relevant. With defer, you don't know what will happen at the end of a block without looking through the whole thing.
1 comments
Why does it matter so much what code runs at the end of a block?