Re: [R] help with oop in R - class structure and syntex

From: Jeffrey J. Hallman <jhallman_at_frb.gov>
Date: Wed, 06 Feb 2008 11:06:10 -0500

"tom soyer" <tom.soyer_at_gmail.com> writes:
> (1) how do I encapsulate the generics? i.e., if a class has 100 methods,
> then does it mean 100 generics would be dumped in the global environment?
> Or, is it possible to define a local environment and restrict the generics
> from one class to a particular environment? But then how do you call the
> generics from a special environment? Also, is it possible to inherit classes
> across different environment?

I think the answer is: you can't. There is no sensible way to assign multi-methods to a particular class. So you have to have some sort of database of methods and signatures that gets consulted by the dispatcher. How you do a sensible IDE with this setup is beyond me. This is my biggest gripe with S4 methods: there doesn't seem to be any good way to browse the environment and discover whats already in there. S3 methods are much easier to follow. You can do multiple dispatch with S3 methods, but hardly anyone ever does. My view is that multiple dispatch is not worth the complexity it adds to a language.

> (2) it seems that an R specific IDE would improve productivity dramatically
> (maybe even necessary?) with respect to oop. Is there such an IDE and does
> it work for oop? I recall a group (in Germany?) was working on it but I
> can't remember where I read about it.

-- 
Jeff

______________________________________________
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.
Received on Wed 06 Feb 2008 - 16:09:20 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 06 Feb 2008 - 16:30:12 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive