Hacker News new | ask | show | jobs
by arcturus17 2641 days ago
What’s so bad about continue and break? I’ve seen it in different languages in what I consider great projects...

Sometimes you really need an exit in the middle of the loop.

2 comments

Worst part is, I've seen devs wrap their entire for-loop in an anonymous function JUST so they could use a return; to break out of the loop, instead of using break;
Nothing is particularly “bad”. I’ve used them in python a number of times.

I’m more just commenting that it’s a strange / interesting code based worth sight seeing. It was written in a style that seemed like from another language.