<div class="gmail_quote">On Wed, Jan 7, 2009 at 6:07 AM, Walter Bright <span dir="ltr"><<a href="mailto:newshound1@digitalmars.com">newshound1@digitalmars.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">Don wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I still avoid goto because I was told to. But eventually I realised that it's 100% propaganda. I actually think my code would be cleaner if I used it; it would allow lots of local flag variables to be eliminated.<br>
But I still have this residual prejudice against 'goto' which is really hard to get rid of.<br>
</blockquote>
<br></div>
The problem with goto is it is easy to get into a human readability problem with it. No such problem exists for optimization algorithms.<div class="Ih2E3d"><br>
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Yes, but I doubt any compiler would have a problem with goto.<br>
</blockquote>
<br></div>
The last time I even heard of a compiler that fell over and gave up optimizing if it saw a goto was in the early 80's. I have a hard time believing LDC has problems with it, but if it does, the authors should hit the books <g>.<br>
</blockquote><div><br>It doesn't :P <br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
I keep thinking I should put on a "Compiler Construction" seminar!<br>
<br>
P.S. There are problems with goto'ing out of a finally block, and there's a problem in the optimizer with goto'ing from one try block to another, but that's not the issue here.<br>
</blockquote></div><br>