Open zachary-foster opened 7 years ago
Before making design decisions on a package meant to be "core", I highly recommend reading Hadley's field guide to OO in R.
Quick comment, S4 is a complete OO, but uses functional semantics. R5 and R6 use the more common "reference" semantics that you've seen elsewhere. S3 is somewhat incomplete, dispatch not explicit, etc.
Thanks @joey711! I have read that a while ago, but it would be a good idea to read it again before starting any S4 programming.
May want to also look at this discussion on coercion:
https://github.com/waldronlab/curatedMetagenomicData/issues/96#issuecomment-328232962
And also at the SummarizedExperiment
class:
I'm adding some coercion methods to SummarizedExperiment for phyloseq and biomformat packages. Pretty natural, and the package code might provide some helpful examples for seeing S4 development in this context. My early mistake with phyloseq was to not leverage this infrastructure more.
For example: We hoped to not have to change the names of either
phyloseq::filter_taxa
ortaxa::filter_taxa
.This is a continuation of the conversion here:
https://github.com/joey711/biom/issues/26