Skip to content
Prev 70292 / 398506 Next

S4 method inheritance

On Mon, 23 May 2005, Ross Boylan wrote:

            
You may be looking for callNextMethod, or foo(as(object, "A")).

The comment about inheritance in my R News article has nothing to do with 
S3 vs S4.  It is just that extensions of data structures typically happen 
by specialisation (for which inheritance is appropriate) whereas models 
are typically extended by generalisation (for which inheritance isn't 
appropriate).

The only relevance to the S3 vs S4 discussion is that it provides an 
explanation for the lack of appreciation of S4. Since most statisticians 
don't use inheritance when programming they don't see the benefit in a 
system that gets inheritance right.

 	-thomas