On Tue, 13 Nov 2001, John Chambers wrote:
I had better mention this one separately, since until it's settled you
need a workaround.
If you define methods for primitives now, this does NOT create an
explicit generic function for, say, "[", so that the original primitive
computations still run.
This means that the method dispatch has to be turned on for that
function somehow else.
Is this true whenever you define a method for a primitive or only if
that primitive hasn't already got methods defined for it?
-thomas
The former, unfortunately. As the function's name suggests,
cacheMetaData collects and merges information about all the currently
visible methods. One doesn't want to do this merge on each dispatch, so
it's triggered by any change in the visible methods (e.g., a call to
setMethod or a change in the search list). So "turned on" really
should have been "notified of a change in the methods".
If I don't hear objections, I plan to add checkMetaData to library,
attach, and detach fairly soon, which should cover the problem.