[Rd] Methods dispatched on "..."

John Chambers jmc at r-project.org
Mon Aug 11 18:14:43 CEST 2008


A new facility has been committed for version 2.8.0 that allows S4 
generics to be defined with "..." as the signature.

Methods are then defined with a single class in the signature.  The 
interpretation is that the method will be selected and called when all 
the arguments matching "..." are from the specified class, or some 
subclass of that class.  See ?dotsMethods for details.

The current implementation is a test.  It's dispatch is done in R code, 
as described in the documentation.  Once the desired semantics are 
clear, it's a natural candidate for adding to the current C dispatch 
code.  Also, in this version "..." cannot be combined with other 
arguments in the generic function's signature.  This is also not a total 
necessity and might be relaxed, after the dispatch is rewritten.

Please play with it, if it sounds useful.

John



More information about the R-devel mailing list