[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Tagged loops (was RE: [PATCH] experimental php-like 'break N' to break acrossmultipleloops)
- From: Sam Roberts <sroberts@...>
- Date: Thu, 2 Nov 2006 08:32:13 -0800
On Wed, Nov 01, 2006 at 06:19:58PM -0500, Jerome Vuarand wrote:
> Spaghetti code come from carelessly used unconditionnal jumps (that is
> the bad goto). I aggree that it can complicate code maintenance, but
Unnecessarily complex and hard to understand flow control can be created
with conditionals as well as with goto.
"Please don't fall into the trap of believing that I am terribly
dogmatical about [the go to statement]. I have the uncomfortable
feeling that others are making a religion out of it, as if the
conceptual problems of programming could be solved by a single
trick, by a simple form of coding discipline!"
For those who think goto in all circumstances is "unstructured
spaghetti", how would you feel about the ability of lua functions to
return from deep inside nested loops being removed?
Breaking out of multiple nested loops is useful!
Knuth - Structured Programming with Goto Statments: