On Tue, Feb 15, 2011 at 5:43 PM, <ken.willi...@thomsonreuters.com> wrote: > > On 2/15/11 4:35 PM, "Gabor Grothendieck" <ggrothendi...@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 ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel