NOAA-FIMS / FIMS

The repository for development of FIMS
https://noaa-fims.github.io/FIMS/
GNU General Public License v3.0
12 stars 8 forks source link

[Refactor]: Make module Rcpp objects S4 classes for consistency #314

Open ChristineStawitz-NOAA opened 1 year ago

ChristineStawitz-NOAA commented 1 year ago

Refactor request

Right now the classes exported into R from Cpp are Reference classes by default but it is easy to refactor them to be S4 classes for consistency with the R objects: https://teuder.github.io/rcpp4everyone_en/160_s3_s4.html

S4 classes have some helpful properties we might want to use, but it would require making small changes to a lot of files, so we probably don't want to do it until after milestone 1

Expected behavior

Expect classes to be consistent across FIMS

Code of Conduct

msupernaw commented 1 year ago

@ChristineStawitz-NOAA This one is confusing, if you call typeof in R, the return is S4. However, show refers to them as Rcpp reference classes. Does that mean Rcpp reference classes are just another name for S4 classes?