"$Bill Luebkert" <[EMAIL PROTECTED]> wrote on 07/13/2005 10:36:04 PM:

> 
> In structured programming practice, a goto would be totally 
inappropriate.
> 
> But ...  when you look at how a switch is implemented in actuality, it's
> full of goto's.
> 
> I guess the point is that you should leave the gotos to the underlying
> generated compiler code and not use it yourself.  But if your language
> is lacking on suitable constructs, you may be forced to use a goto just
> to save all the otherwise unnecessary code to go structured.
> 
> My suggestion - avoid if possible - else use cautiously and 
infrequently.
> 
My opinion is that the goto statement can be useful in error handling 
situations, particularly when parsing data. This removes the 
rarely-executed error handling code from the expected, normal processing 
code. This makes the normal code more cohesive, understandable, and 
maintainable (IMO) because it remains sequential, uncluttered by 
unnecessary indentation, braces, etc. Of course, Perl provides synonyms 
for 'goto' in these scenarios (last, continue).

_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to