News for hackers. Stuff that matters.
Re:My Thoughts on “Bad Code” by JohnFen on Friday March 17, 2023 @04:45PM (#35202678)
Yes, I've seen this a lot over the years.

Also, putting code inside a do ... while( false ) loop purely so you can use break as a sneaky goto to avoid deeply nested conditionals while technically adhering to the single return rule.

I think when you're starting to use control statements in bizarre ways like that, it's a good indication that maybe that's a case where breaking the "rules" is the best thing.

There are no comments on this comment yet.