[Bioc-devel] best practices for callGeneric()
Hervé Pagès
hpages at fhcrc.org
Mon Jul 23 07:42:38 CEST 2012
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:
> Hi guys,
>
> We often use callGeneric in wrapper methods when delegating. In some ways,
> this is nice, because it conveys the wrapper semantic. However, it can also
> be problematic e.g. when searching the code for all calls to a generic,
> since the actual name of the generic is obscured. It's also maybe a little
> tougher to read, because when I see "callGeneric" I have to recall the name
> of the generic for the current method. Also, we sometimes use
> callGeneric(), i.e., with no arguments. This is kind of a cool shortcut,
> but it also hurts readability, since it is drawing the arguments from the
> current frame, which we have to construct in our head. Are we having too
> much fun with this function?
>
> Michael
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>
--
Hervé Pagès
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024
E-mail: hpages at fhcrc.org
Phone: (206) 667-5791
Fax: (206) 667-1319
More information about the Bioc-devel
mailing list