[R] truly object oriented programming in R

Thomas Lumley tlumley at u.washington.edu
Thu Aug 12 20:49:09 CEST 2004


On Thu, 12 Aug 2004, Seth Falcon wrote:

> The thing that's very different from, say, Java is that everything is an
> object in R --- there isn't a notion of a *reference* to an object,
> which is why in the above I had to say "head <- insertNode(...)" where
> as in Java you could pass in a reference to head and have the method
> modify what it points to.
>
> I think there are some ways around this, at least syntactically, using
> various tricks with environment(), but I don't yet understand them well
> enough to comment further.
>

Yes, and there is support in packages for other object systems in addition
to the two built-in ones.

Some of us feel that if you want Java you know where to find it...


	-thomas




More information about the R-help mailing list