However an large function can also ramper readability and
mantainiblility. I think the best thing is to evaluate on how to write
a function on a case by case basis.<br><br><div><span class="gmail_quote">On 9/28/05, <b class="gmail_sendername">Thomas Weidenmueller</b> <<a href="mailto:w3seek@reactos.com">w3seek@reactos.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Casper Hornstrup wrote:<br>><br>><br>>>The alternative is: do the cleanup at every return, use goto or use<br>>>try/finally.<br>>>1)Cleanup at every return is madness. Most functions in ros do a large
<br>>>amount of cleanup at each return and I sometimes spot mistakes where<br>>>one/more return misses some cleanup. Those errors are _hard_ to find.<br>><br>><br>> The functions are too large then. Use more smaller functions instead.
<br><br>I agree with Nathan. Having tons of small functions often isn't a good<br>solution, especially when you'd have to create dozens of small helper<br>functions. That not just only generates slower code but also makes it
<br>more difficult to get a picture of the algorithm used. I much more<br>prefer jumping to cleanup labels the way Nathan demonstrated it. Of<br>course I avoid it where it doesn't make sense.<br><br>- Thomas<br>_______________________________________________
<br>Ros-dev mailing list<br><a href="mailto:Ros-dev@reactos.com">Ros-dev@reactos.com</a><br><a href="http://reactos.com:8080/mailman/listinfo/ros-dev">http://reactos.com:8080/mailman/listinfo/ros-dev</a><br></blockquote></div>
<br><br clear="all"><br>-- <br><P>My
DeviantArt.com page: <A
href="<a href="http://crashfourit.deviantart.com/"">http://crashfourit.deviantart.com/"</a>><a href="http://crashfourit.deviantart.com/">http://crashfourit.deviantart.com/</a></A><BR>My
FanFiction.net bio page: <A
href="<a href="http://www.fanfiction.net/u/726606/"">http://www.fanfiction.net/u/726606/"</a>><a href="http://www.fanfiction.net/u/726606/">http://www.fanfiction.net/u/726606/</a></A><BR>My
Blog: <A
href="<a href="http://crashfourit.blogspot.com"">http://crashfourit.blogspot.com"</a>><a href="http://crashfourit.blogspot.com">http://crashfourit.blogspot.com</a></A><BR>America's
Debate: <A
href="<a href="http://www.americasdebate.com/"">http://www.americasdebate.com/"</a>><a href="http://www.americasdebate.com/">http://www.americasdebate.com/</a></A>
</P>