There are cases where goto makes code more readable not less readable. Take nested loops, for example where you need to break out of the outer most loop from inside the inner most loop. Currently there are no semantics to do that cleanly other than using a goto or adding a bunch of arbitrary and unnecessary logic to determine when you are finished.<div>
<br></div><div><div>-Daniel</div><div><br></div><div><div class="gmail_quote">On Tue, Jan 27, 2009 at 1:45 PM, Alex Balashov <span dir="ltr"><<a href="mailto:abalashov@evaristesys.com">abalashov@evaristesys.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="Ih2E3d">Raúl Alexis Betancor Santana wrote:<br>
> El Martes, 27 de Enero de 2009 21:13, Daniel Corbe escribió:<br>
>> You should read <a href="http://kerneltrap.org/node/553/2131" target="_blank">http://kerneltrap.org/node/553/2131</a><br>
>> There's plenty of cases where goto is justified and certainly branching out<br>
>> into error conditions is one of them. At least on the intel architecture<br>
>> goto typically translates 1:1 to the jmp instruction and is monumentally<br>
>> more efficient than constructing complex and hard to understand loops.<br>
><br>
> Goto statements should be avoided, it's not a matter of how much time it takes<br>
> to "goto", it's a matter readability of the code<br>
><br>
<br>
</div>Except where performance really matters.<br>
<br>
In the case of error handling of atypical situations, probably not very<br>
important.<br>
<br>
In the case of something that is inline to the core's processing of<br>
every request, on the other hand...<br>
<font color="#888888"><br>
--<br>
Alex Balashov<br>
Evariste Systems<br>
Web : <a href="http://www.evaristesys.com/" target="_blank">http://www.evaristesys.com/</a><br>
Tel : (+1) (678) 954-0670<br>
Direct : (+1) (678) 954-0671<br>
Mobile : (+1) (678) 237-1775<br>
</font><div><div></div><div class="Wj3C7c"><br>
_______________________________________________<br>
Kamailio (OpenSER) - Devel mailing list<br>
<a href="mailto:Devel@lists.kamailio.org">Devel@lists.kamailio.org</a><br>
<a href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/devel" target="_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/devel</a><br>
<a href="http://lists.openser-project.org/cgi-bin/mailman/listinfo/devel" target="_blank">http://lists.openser-project.org/cgi-bin/mailman/listinfo/devel</a><br>
</div></div></blockquote></div><br></div></div>