Re: Wouldn't it be simpler and more readable to use a goto instead of a pseudo-loop?
Re: Wouldn't it be simpler and more readable to use a goto instead of a pseudo-loop?
Posted Dec 25, 2014 22:36 UTC (Thu) by vonbrand (subscriber, #4458)In reply to: Re: Wouldn't it be simpler and more readable to use a goto instead of a pseudo-loop? by ldo
Parent article: The "too small to fail" memory-allocation rule
Please, no knee-jerk "no goto ever" reactions, go read Knuth's "Structured programming with goto statements", ACM Computing Surveys 6(4), dec 1974, pp 261-301. Check how goto is used in the kernel, write up gotoless code doing the same. You'll find that the gotoless code is easier to understand and often significantly more efficient.