[Kst] kdeextragear-2/kst/kst

Barth Netterfield netterfield at astro.utoronto.ca
Thu Aug 12 21:11:39 CEST 2004

Whether one should return other than the end seems context dependent.

Clearly exiting deep in the middle of a nested structure in the middle of a 
subroutine can be very easy to miss.

On the other hand, putting validity tests right at the beginning of a function 
can really clean up the code.

So....  probably not going to find a hard and fast rule....


On August 12, 2004 02:58 pm, George Staikos wrote:
> On Thursday 12 August 2004 12:42, Andrew Walker wrote:
> > As an aside it is generally good policy to return only from the end of a
> > function to avoid these kind of errors.
>   There is KstReadLocker and KstWriteLocker for that.  Returning only from
> the end of a function tends to result in huge levels of nesting or too many
> functions for one task.

More information about the Kst mailing list