-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
Lines 345 to 352 in 14bdb11
| It is bad practice to use `{}` in the generic as it triggers a special case that is more expensive, and generally best avoided. | |
| ```{r} | |
| # Don't do this! | |
| setGeneric("myGeneric", function(x) { | |
| standardGeneric("myGeneric") | |
| }) | |
| ``` |
Casually, it seems strange to expect a noteworthy performance hit from using {. And it's ambiguous when we expect that performance hit -- package build time, or run time?
I glanced at the setGeneric() code and didn't immediately spot any "edge case", it probably requires more careful reading to figure this out.
Moreover, there are multiple examples in ?setGeneric itself that use {:
A link to an external reference here would be good.
Metadata
Metadata
Assignees
Labels
No labels