Hi, I'm new to OOP in R so please forgive the naiveness of some of the questions. Here are a couple of them. It would be great if you can contrast to OOP in Java.
1. R's S4 appears to centered around a dispatch mechanism which in my understanding is just a way to implement polymorphism. Now, here's the snag, I thought polymorphism was an aspect of OOP not by itself the definition of OOP. What am I missing here? Is any language that implements polymorphism automatically OO? 2. Can someone provide a simple example of how NextMethod() works? I read some things about but I can't make any sense out of it. It's supposed to facilitate inheritance but how? Why is it needed, what happens if it's ignored? An example would be useful. Is there a Java equivalent of NextMethod()? Many Thanks! ______________________________________________ R-help@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.