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> &lt;<a href="mailto:w3seek@reactos.com">w3seek@reactos.com</a>&gt; 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>&gt;<br>&gt;<br>&gt;&gt;The alternative is: do the cleanup at every return, use goto or use<br>&gt;&gt;try/finally.<br>&gt;&gt;1)Cleanup at every return is madness. Most functions in ros do a large
<br>&gt;&gt;amount of cleanup at each return and I sometimes spot mistakes where<br>&gt;&gt;one/more return misses some cleanup. Those errors are _hard_ to find.<br>&gt;<br>&gt;<br>&gt; 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>&lt;P&gt;My
DeviantArt.com page: &lt;A
href=&quot;<a href="http://crashfourit.deviantart.com/&quot;">http://crashfourit.deviantart.com/&quot;</a>&gt;<a href="http://crashfourit.deviantart.com/">http://crashfourit.deviantart.com/</a>&lt;/A&gt;&lt;BR&gt;My
FanFiction.net bio page: &lt;A
href=&quot;<a href="http://www.fanfiction.net/u/726606/&quot;">http://www.fanfiction.net/u/726606/&quot;</a>&gt;<a href="http://www.fanfiction.net/u/726606/">http://www.fanfiction.net/u/726606/</a>&lt;/A&gt;&lt;BR&gt;My
Blog: &lt;A
href=&quot;<a href="http://crashfourit.blogspot.com&quot;">http://crashfourit.blogspot.com&quot;</a>&gt;<a href="http://crashfourit.blogspot.com">http://crashfourit.blogspot.com</a>&lt;/A&gt;&lt;BR&gt;America's
Debate: &lt;A
href=&quot;<a href="http://www.americasdebate.com/&quot;">http://www.americasdebate.com/&quot;</a>&gt;<a href="http://www.americasdebate.com/">http://www.americasdebate.com/</a>&lt;/A&gt;
&lt;/P&gt;