From ripley at stats.ox.ac.uk  Tue Aug  5 20:05:17 2003
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Tue Aug  5 20:04:56 2003
Subject: [Rd] s4 methods and base
In-Reply-To: <8CBAA121CEB4D5118CB200508BB2BBEF0317E8F4@xmx8lonib.lonib.commerzbank.com>
Message-ID: <Pine.LNX.4.44.0308051854300.4424-100000@gannet.stats>

On Tue, 5 Aug 2003, Marsland, John wrote:

> I'm sure that many people are in the same position as me in that they are
> trying to write packages and code that is vaguely "future proof".
> 
> Would it be possible to get some guidance on how the R-core team see the
> evolution of the "base" package with regard to s4 methods.
> 
> There seem to be quite a lot of inconsistencies between s3 and s4 methods
> and classes currently and this (I'm sure) is only to be expected in a period
> of transition. eg POSIXlt vs POSIXt and POSIXct. And there seem like dozens

Those are S3 classes, and there is nothing transitional about them!
There are no S4 classes in `base R' that I am aware of to be inconsistent.
Are you sure you understand the difference?

> of print methods to convert 

First you need to define S4 classes, and there are currently no moves to 
do that for the statistical modelling software, for example.

> - it's not an enviable task and I'm sure it will
> take time! ... if indeed you do see R being purged of s3 by some point in
> the future.

We are still using S3 classes designed a decade ago, and I expect to be 
still using them in another decade.  I even have S4 versions of some of 
them (e.g. lda, multinom) and no plans to use those in R.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


[Rd] s4 methods and base
Prof Brian Ripley