On Aug 12, 2006, at 9:06 PM, Arnaud Nicolet wrote:
Le 8 août 06 à 06:31 Matin, Norman Palardy a écrit:
GOTO is mostly never required and should be avoided in 99.9% of
all cases where you think you need it.
Hi,
why should it be avoided?
_______________________________________________
Early in the development of "structured programming" - which is only
a part of the Object-oriented environment we now enjoy, people tried
to argue that GOTO was harmful, and violated the structure "rules" -
and prevented proving programs correct. This was primarily in
response to the "spaghetti code" - tangled logic and messy code -
that people were then using to make buggy programs.
Unfortunately for those who argued against the "goto", it was easy to
develop correctness rules for it, and most of the other arguments
fell by the wayside. Except the fact remains that those who develop
tangled code without clear paths of control still make many program
"bugs" that are very difficult to find.
SO - the reason to avoid GOTO today is that it is dangerous. It's too
easy to make a mess if you use a GOTO. And maintenance programmers
may be totally unable to help you resolve your problems if you do.
But it works, and, under very special circumstances, its use may be
justified. You need to learn a lot about programming before you can
make that argument stick, though.
For now, let's just say that you don't need it, and it's too dangerous.
Russ
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>