[Rd] question

Thomas Petzoldt Thomas.Petzoldt at TU-Dresden.de
Sat Mar 7 18:38:45 CET 2009


Patrick Burns wrote:
> One idea of program design is that users
> should be protected against themselves.
> 
> It is my experience that users, especially
> novices, tend to over-split items rather than
> over-clump items.  The fact that items are
> returned by the same function call would
> argue to me that there is a connection between
> the items.
> 
> 
> Patrick Burns
> patrick at burns-stat.com
> +44 (0)20 8525 0696
> http://www.burns-stat.com
> (home of "The R Inferno" and "A Guide for the Unwilling S User")

Hi Gabor, Patrick, Ivo and vQ,

I agree with Patrick and Gabor that it is not needed. IMHO it is good 
design that a function (in a mathematical sense) returns ONE object, let 
it a single value, a list or an S3/S4 object. This can be passed to 
another function as a whole or can be splitted to its parts according to 
different needs. If only single parts are required, than I would suggest 
to use accessor functions preferably written as generics working on 
returned S3 or S4 objects. I'm strongly against going back to the past S 
behaviour and I wonder a little bit about this discussion. I like it to 
have a clean workspace with only a few objects.

Thomas Petzoldt



More information about the R-devel mailing list