Skip to content

[Bioc-devel] best practices for callGeneric()

3 messages · Michael Lawrence, Hahne, Florian, Hervé Pagès

#
Hi Michael,
I have some examples where I delegate by first casting the dispatched
argument and then directly calling the generic again. I assume that is
more or less equivalent to what you are doing, avoiding the readability
issues. The problem with the somewhat obscure argument list remains,
however (unless you explicitly list all formal arguments, but then you
might have to extract them from ?). When reading through the code this
still looks odd because you get the impression that you method is somewhat
recursive. So not sure whether that solution is any better than
callGeneric?
Florian
#
Hi Michael,

I'm not fond of callGeneric() because of what you mentioned and
also because that makes the code not "relocatable" i.e. if I want to
move it to a helper function, then I have to remember to replace
callGeneric by the real name of the generic.

H.
On 07/22/2012 03:53 AM, Michael Lawrence wrote: