Re: What do you think about the code?



Ian Collins posted:


I agree 100% with Richard's comments, the cleaner the code structure,
the easier it is to refactor. That's why my last team banned goto
outright.


I find "goto" necessary when I have nested loops, for example:


while ( expr1 )
{
while ( expr2 )
{
while ( expr3 )
{
goto OUT_OF_ALL_LOOPS;
}
}
}

OUT_OF_ALL_LOOPS: ;


In my own humble opinion, I think it's childish to outright ban something
when it comes to computer programming -- I feel it gives an air of
inconfidence in one's competence.


--

Frederick Gotham
.



Relevant Pages

  • Re: What do you think about the code?
    ... the easier it is to refactor. ... That's why my last team banned goto ... I find "goto" necessary when I have nested loops, ... I think it's childish to outright ban something ...
    (comp.lang.c)
  • Re: What do you think about the code?
    ... That's why my last team banned goto ... I think it's childish to outright ban something ... while (expr3 &&!done) ... lot of good archives). ...
    (comp.lang.c)