s-news
[Top] [All Lists]

Re: [S] Is this really good programming practice?

To: Bill Venables <wvenable@attunga.stats.adelaide.edu.au>
Subject: Re: [S] Is this really good programming practice?
From: "Jeffrey J. Hallman" <m1jjh00@Frb.GOV>
Date: Fri, 27 Mar 1998 10:43:54 -0500
Cc: Brett Presnell <presnell@maths.anu.edu.au>, s-news@wubios.wustl.edu
In-reply-to: Your message of "Fri, 27 Mar 1998 23:28:54 +1030." <9803271258.AA03922@attunga.stats.adelaide.edu.au>
Sender: owner-s-news@wubios.wustl.edu
>>>>> "BV" == Bill Venables <wvenable@attunga.stats.adelaide.edu.au> writes:
[ an explanation of lazy evaluation ]

But is it good style?  Well, you can always look at the code to see what's
going on, can't you?

> grep("eta", as.character(glm[[length(glm)]]))
numeric(0)

Oops.  

At the very least, I think the documentation for glm() should say what the
default value for 'start' is.  And it wouldn't hurt at all for 'eta' to have a
longer, more descriptive name.

Really, clarity of the code is almost always more important than execution
efficiency, and it's always more important than saving keystrokes for the
programmer. 

Jeff


-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>