Re: not sure I'd agree that breaking out of a loop just to test the same error condition
Re: not sure I'd agree that breaking out of a loop just to test the same error condition
Posted Dec 28, 2014 3:27 UTC (Sun) by reubenhwk (guest, #75803)In reply to: Re: not sure I'd agree that breaking out of a loop just to test the same error condition by ldo
Parent article: The "too small to fail" memory-allocation rule
>> propagating the error condition onwards. That is the whole point of the nesting.
Better yet, use a function for each of those nested levels. Worried about spaghetti code? Then factor out the nesting and call smaller functions with less looping and less nested resource management. Use the return value to propagate error conditions onward.
Posted Dec 28, 2014 6:34 UTC (Sun)
by ldo (guest, #40946)
[Link] (3 responses)
Posted Dec 29, 2014 2:58 UTC (Mon)
by reubenhwk (guest, #75803)
[Link]
Posted Dec 29, 2014 3:19 UTC (Mon)
by bronson (subscriber, #4806)
[Link] (1 responses)
Posted Dec 29, 2014 17:30 UTC (Mon)
by nix (subscriber, #2304)
[Link]
The argument from popularity is not a good one, but if something is not popular it is not terribly wise to imply that in fact it is.
Re: Better yet, use a function for each of those nested levels.
Re: Better yet, use a function for each of those nested levels.
Re: Better yet, use a function for each of those nested levels.
Re: Better yet, use a function for each of those nested levels.