Skip to content
Prev 9065 / 21312 Next

[Bioc-devel] import except on Window Machine

Hi Michael,
On 04/11/2016 01:23 PM, Michael Lawrence wrote:
What's the rationale behind this feature? It seems to be a recurrent
source of surprise and confusion. In the last couple of years I must
have fixed dozens (maybe 100+) of NAMESPACEs that import things from
the wrong place, that is, what the maintainer of the package actually
needs and should import is the foo() generic from package A, but s/he
imports a particular method from package B instead. Sometimes that
method is not even the one that they actually need. *Unfortunately*
things work for a while but break later when the random method they
import disappears from package B.

One almost always calls the generic, not a particular method directly.
So personally I never use importMethodsFrom. Don't see the need for it.
I don't even know what it does i.e. what importing a method means
exactly. AFAIK when I call the generic, dispatch on the appropriate
method works, whether I "import" that method or not...

Getting the NAMESPACE right has always been a source of struggle
for developers. Simplifying and clarifying some of the concepts
involved would help make the process a little more straightforward.

Thanks,
H.