From ggrothendieck at gmail.com  Wed Feb 16 00:09:52 2011
From: ggrothendieck at gmail.com (Gabor Grothendieck)
Date: Tue, 15 Feb 2011 18:09:52 -0500
Subject: [Rd] Request: Suggestions for "good teaching" packages,
 esp. with C code
In-Reply-To: <C9805C71.23A27%ken.williams@thomsonreuters.com>
References: <AANLkTikOVVyMF0Xjn2Re9JLekvKoi2euZdZodEJnN9WM@mail.gmail.com>
	<C9805C71.23A27%ken.williams@thomsonreuters.com>
Message-ID: <AANLkTi=z8JwjNtnKO7c_ouPktPsk0nE0E9-mGAdt10Vs@mail.gmail.com>

On Tue, Feb 15, 2011 at 5:43 PM,  <Ken.Williams at thomsonreuters.com> wrote:
>
> On 2/15/11 4:35 PM, "Gabor Grothendieck" <ggrothendieck at gmail.com> wrote:
>
>>I think the real good programming practice is to have a single point
>>of exit at the bottom.
>
> I disagree, it can be extremely useful to exit early from a function. ?It
> can also make the code much more clear by not having 95% of the body in a
> huge else{} block.
>

If that is the case then the routines may be too large.  One of the
purposes of this widely practiced principle is to encourage
modularity.

Also achieving code coverage can be simplified when using single point
of return rather than multiple points of return.

-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com



[Rd] Request: Suggestions for "good teaching" packages, esp. with C code
Gabor Grothendieck