From sfalcon at fhcrc.org  Wed Oct 18 16:30:12 2006
From: sfalcon at fhcrc.org (Seth Falcon)
Date: Wed, 18 Oct 2006 07:30:12 -0700
Subject: [Rd] Caching bug with showMethods?
In-Reply-To: <45362CA9.4050803@r-project.org> (John Chambers's message of "Wed,
	18 Oct 2006 09:31:21 -0400")
References: <m2ac3uv954.fsf@ziti.local> <45362CA9.4050803@r-project.org>
Message-ID: <m2zmbtsnm3.fsf@ziti.local>

John Chambers <jmc at r-project.org> writes:
> No, not a bug.
>
> Inherited methods are never cached until they are needed, for rather
> obvious efficiency reasons. See ?showMethods, under argument
> inherited=

ok, I missed the doc, which is quite clear about showMethods not doing
what I wanted...

> If what you were trying to do was find out what method would be called
> for class "B" without calling it, use selectMethod().

Yes, that is what I was trying to do.  I thought showMethods was the
preferred user interface to ask the system about what methods are
available.  

When would one want the behavior of showMethods?  Is it ever useful
for a user to ask, "what are the methods that have been cached?".

The problem with using selectMethod is one needs to know in advance
the name of a generic.  I would like to have a tool that lets me
discover "what can be done" with an instance of a given class.
showMethods is very close to being that tool, but the interaction with
the method caching makes it confusing (until one has a solid
understanding of the method caching, but IMHO this isn't something a
user should need to know about if at all possible).


Best,

+ seth

--
Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center
http://bioconductor.org




[Rd] Caching bug with showMethods?
Seth Falcon