[R] OO programming & S3/S4 paradigm - General questio

Gabor Grothendieck ggrothendieck at gmail.com
Fri Jan 30 15:36:31 CET 2009


S3 is the original OO approach in R.  It is the predominant one and
the simplest one.  That's the one to use if you are starting out.  You
may never, in fact, need to go beyond that.   S4 builds on S3 so
learning S3 won't be a waste of time even if you decide to use S4 later.
S4 is substantially more complex than S3.

There are also a number of packages that implement alternative
OO models.  R.oo implements a model closer to the conventional
model that other languages use.  proto implements the prototype
model, particularly applicable to user interface work.

On Fri, Jan 30, 2009 at 8:47 AM, julien cuisinier
<j_cuisinier at hotmail.com> wrote:
>
> Hi,
>
>
>
> Being relatively new to OO programming and not so old on R, I noticed the possibility to do OO programming in R.
> But it seems there is two "paradigms" S3 that seems the old one but is the one used in the R.oo package and S4 which seems more recent
>
> As a starting point, which one is best to use? Is R.oo useful? what are the main difference between the two?
>
>
> Any feedback helpful.
>
>
> Many thanks in advance & have a nice weekend!
> Julien
>
>
> _________________________________________________________________
>
>  charlas.
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>




More information about the R-help mailing list