Skip to content

2 setGeneric's, same name, different method signatures

2 messages · Greg Minshall, William Dunlap

#
Martin,

fantastic.  thank you *very* much!  that clears lots of things up for
me.

(for the record: i think that setGeneric overwriting a previous is more
surprising -- thus violating the principle of least surprise -- than one
function overwriting a previous, in that we think of (or, one way to
think of) OOP is that, after finagling to have no clashes on *class*
names, we should not worry about other than intra-class name clashes.
as i said, for the record.)

thanks again.

cheers, Greg
----
Martin Morgan <mtmorgan at fhcrc.org> wrote:
#
Earlier you wrote
and here mention "intra-class name clashes" (I'm not sure what you
mean by this).

In R, classes do not "own" (or contain) generic functions.  They can supply
methods for generic functions but a generic function is an object that
exists outside of any class.  C++ and Java do things differently.

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com