Re: Why the f*ck do you for instance do things like this?
Re: Why the f*ck do you for instance do things like this?
Posted Dec 30, 2014 20:42 UTC (Tue) by ldo (guest, #40946)In reply to: Re: Please, no knee-jerk "no goto ever" reactions by filipjoelsson
Parent article: The "too small to fail" memory-allocation rule
I have this convention: if one of the exits from a loop is via an explicit break, then all exits from the loop shall be via explicit breaks. That way you don’t have to look for more than one kind of termination condition, just look for the breaks. Only if there are none will there be something like a for-loop termination condition. Never mix the two.
Posted Dec 30, 2014 21:12 UTC (Tue)
by filipjoelsson (guest, #2622)
[Link]
Is there any construct that you use as intended?
Re: Why the f*ck do you for instance do things like this?