Comment

Comment by goto11

To be fair, break is not goto, since it adheres to the block structure of the code, while goto can jump to arbitrary locations.

The code in question should of course be written with an if. A goto would not really be an improvement, both goto and break are really weird way to express something which seems to be simple conditional.

I agree goto's a fine if they are the simplest and most readable solution. But this does not seem to be such a case.

parent goto11 8 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton