Skip to content

Commit

Permalink
add note about generics from base / utils functions, closes #131
Browse files Browse the repository at this point in the history
  • Loading branch information
LiNk-NY committed Dec 17, 2024
1 parent 10de37b commit db5c5f7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions r-code.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,13 @@ Bioconductor. One example of a generic and method implementation is that of the
numeric vector of the same length as the rows and is adhered to across classes
including the `DelayedMatrix` class. Re-using generics reduces the amount of
new generics by consolidating existing operations and avoids the mistake of
introducing a "new" generic with the same name. Generic name collisions may
mask or be masked by previous definitions in ways that are hard to diagnose.
More recently, we recommend the use of `r BiocStyle::CRANpkg("conflicted")` to
identify namespace collisions.
introducing a "new" generic with the same name. Note that in order to re-use
a generic, the behavior of the method should align with the originally
proposed behavior of the generic. Avoid creating generics from existing `base`
or `utils` functions as this can lead to confusion and conflicts with
existing functions and generics. Generic name collisions may mask previous
definitions in ways that are hard to debug and diagnose. We recommend the use of
`r BiocStyle::CRANpkg("conflicted")` to identify namespace collisions.

If there are problems, e.g., in performance or parsing your particular
file type, ask for input from other developers on the
Expand Down

0 comments on commit db5c5f7

Please sign in to comment.