Y
Hacker News
new
|
ask
|
show
|
jobs
by
bouk
1066 days ago
The first doesn't do control flow
1 comments
rcme
1066 days ago
Depends how getNext is defined.
link
alphazard
1066 days ago
The only way to do control flow in getNext, consistent with how you partially defined it, is to panic. That means there is some important code wrapping the whole loop body that you left out.
link
zeroxfe
1066 days ago
That doesn't make sense. `getNext()` has no ability to break out of the loop.
link