Peter Haverty
2015-Aug-21 22:07 UTC
[Rd] RFC: deprecating some complexity in key methods package functions
Dear R community, I have been working on speeding up a few parts of the methods package and related environment/namespace functionality. I would like to get some community input on a few proposed changes that are rather small, but do involve deprecations. These changes would simplify and speed-up some functions that are called with extreme frequency. ?I have made a few suggestions in the following R bug tracker submissions:? https://bugs.r-project.org/bugzilla3/attachment.cgi?id=1896 https://bugs.r-project.org/bugzilla3/attachment.cgi?id=1897 In summary, the function 'is' can be called with a single argument, which gives the same result as calling 'extends' directly. The second argument to 'is' can be one of two types (a class name or a class definition), but it seems that only one of those options is ever used in methods or in base.? I'd like to deprecate using a classDef as the second argument as we can now go quite fast without doing so. ?.getGeneric has an unnecessary swap of as.double for as.numeric and also what looks like it might be a bit of vestigial debug code ( a check for package == "" and detailed stack trace). The subsequent C code also checks for this situation, so I think we can omit the first check.? ?If anyone feels strongly about deprecating? these code paths, please let me know. As a community, we are very careful about backwards compatibility so I want to be sure no one needs these things. ?Regards,? Pete ____________________ Peter M. Haverty, Ph.D. Genentech, Inc. phaverty at gene.com [[alternative HTML version deleted]]