From rgentlem@hsph.harvard.edu  Fri Apr 16 14:04:30 1999
From: rgentlem@hsph.harvard.edu (Robert Gentleman)
Date: Fri, 16 Apr 1999 09:04:30 -0400 (EDT)
Subject: R's UseMethod() does not dispatch on changed class() (PR#167)
In-Reply-To: <14102.54983.17904.253771@arcola.stats.adelaide.edu.au>
Message-ID: <Pine.SV4.4.05.9904160858520.25362-100000@hsph.harvard.edu>



On Fri, 16 Apr 1999, Bill Venables wrote:

> Well, I have to admit that I have egg all over my face this
> time, and if you don't want to have the long-winded justification
> I suggest you pass to your next email...
> 
> --
> 
> In my defence I was misled by what can only be called an S3 bug,
> now probably unfixable since some code probably depends on it.

  Great examples. I am coming to understand the S3 model. Now,
 does anyone want to say what we want? Brian, you probably use this
 stuff more than most. Do you want to say what you want and I'll
 see what can be done to duplicate it. Anyone else that wants to
 chime in?

> 
> 
> One clear moral seems to be don't do anything more inside a
> generic function than you really need to do.  Keep it *very*
> simple indeed.
> 
   I recall JMC saying something like, all generic functions
 should be one line long; a call to the appropriate UseMethod.

   My own belief in this regard is that once you start down the
  OO road the object is immutable (otherwise what is the point?).
  Unfortunately the flexibility of S-like languages makes this
  impossible to enforce. There is also the issue of when do you 
  "start down the OO road", I always felt it was with the call
  to the generic but perhaps it's with the call to UseMethod.

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


R's UseMethod() does not dispatch on changed class() (PR#167)
Robert Gentleman