arwalker at sumusltd.com
Wed Nov 23 01:19:17 CET 2005
I think if you compare the number of bugs as a result of early returns
with the number of bugs as a result of huge nesting blocks (a somewhat
relative term) it would favour going with the nesting.
On November 22, 2005 3:24 pm, George Staikos wrote:
> SVN commit 482449 by staikos:
> missed one
> M +4 -0 codingstyle.txt
> --- trunk/extragear/graphics/kst/devel-docs/codingstyle.txt #482448:482449
> @@ -131,6 +131,10 @@
> - Pass arguments and return values as const& where applicable for
> performance reasons.
> +- Early returns to avoid huge nesting of blocks is -good-. It makes the
> code + easy to understand. Do it, and don't remove it. Use judgement to
> avoid + making soup.
> - Have care to push class instantiations down as far as possible in scope.
> Some are quite expensive to instantiate and there is no value in
> following the old C-style declarations. Instantiating objects that aren't
> used just _______________________________________________
> Kst mailing list
> Kst at kde.org
More information about the Kst