mllg / checkmate

Fast and versatile argument checks
https://mllg.github.io/checkmate/
Other
261 stars 30 forks source link

Adding Support for S7 Class Checking? #255

Open jmiahjones opened 7 months ago

jmiahjones commented 7 months ago

I wrote a bit of a wrapper code for validating class properties in the new S7 object paradigm. It is relatively short and just passes arguments to checkmate check functions.

https://github.com/RConsortium/S7/pull/398

As you can see, there is some discussion around where such logic "should" live.

I'm attempting to find a home for this bit of glue. What are your thoughts on adding something like this to checkmate, and including a suggested dependency on S7? It would evolve the scope of this project from function arguments to class properties, but would ultimately be very little code to support and align pretty well with the purpose.

My alternative, I think, is to create a separate helper package with less than 50 lines of code and a dependency on checkmate and S7.