问题
Apparently John Chambers added Reference Classes to R in version 2.12. There doesn't appear to be much information online yet, but they're calling them R5 classes, which implies they're on a level with S3 and S4 classes.
Question: What is a reference class, and how does this fit in with existing class types?
回答1:
The request for documentation for ReferenceClasses comes up every now and then, for example on the r-devel list. The best answer so far is to actually look at what help(ReferenceClasses)
gives you---which is a pretty decent start.
Then there are a few presentations:
- John's presentation in November 2010 at Stanford
- Martin Morgan in November 2010 from the BioConductor Europe meetings
- Romain and myself mention it in the Google Tech Talk on Rcpp
And as noted by mdsummer in the comment, R5 was a short-lived joke. There was already another R-related project called R5, and John much prefers ReferenceClasses. And I reckon they are here to stay. People use them already as e.g. Jeff Horner is his new Rack package.
来源:https://stackoverflow.com/questions/5137199/what-is-the-significance-of-the-new-reference-classes