News for hackers. Stuff that matters.
Re:My Thoughts on “Bad Code” by JohnFen on Friday March 17, 2023 @12:52PM (#35199632)
> It was hammered into my when I first learned that you should only ever have one exit in your code, anything else is bad practice.

Yes. This rule was an overreaction to a pervasive problem back in the day.

But, much like the use of "goto"s, there are times where your code is more readable, maintainable, and efficient if you ignore the prohibition. The trick is to know when that's the case.

There are no comments on this comment yet.