Bioconductor / bioc_mentorship_docs

Training materials for mentors and mentees
https://Bioconductor.github.io/bioc_mentorship_docs/
2 stars 1 forks source link

I have code that is not an S4 object or method #6

Open llrs opened 3 years ago

llrs commented 3 years ago

create_batches() is the only non-S4 function. Should I something like a BatchList class to store the list of IntegerList batches? That way the input to train() will also have an S4 object instead of list as the second argument.


I understand this question as: "I have code that is not an S4 method or object, is it okay?"
It is okay to have S4, S3 and other non object oriented functions, you only need to use object oriented programming when it makes sense or are reusing other existing infrastructure.

Think on what makes sense on your package or field, if there is a need for a new class or if methods make sense for it (Probably it won't and it is perfectly fine)