Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move to object oriented system #4

Open
2 tasks
dpastoor opened this issue Oct 23, 2014 · 4 comments
Open
2 tasks

move to object oriented system #4

dpastoor opened this issue Oct 23, 2014 · 4 comments

Comments

@dpastoor
Copy link
Collaborator

Given the long term objective is to make this (somewhat) software agnostic, switching to an object oriented system will probably reduce a lot of headache rather than massive ifelse chains. It will require some reorg but is definitely feasible. The two options I see are the S4 system or the R6 system

S4 pros/cons

  • older therefore more documentation
  • system used for xpose so can look at source code for ideas (for better or worse)

R6 classes

  • newer, faster
  • easier to update objects
  • in development by winston chang/Rstudio folks
  • newer (subject to api changes)

I think either one would be completely sufficient for our means (performance bottlenecks due to object creation, etc will not be an issue), but personally take the opportunities to 'look forward' whenever possible.

Todos:

  • choose OO system
  • determine general 'spec' of how want to handle design (eg separation of data preprocessing, processing, plotting, etc)
@dpastoor
Copy link
Collaborator Author

hmm nevermind R6 (and reference classes) are a whole separate beast - especially in regards to being mutable, probably will want to stick with just S3 or S4

@ronkeizer
Copy link
Owner

My experiences with S4 are not so positive. When I added some functionality to Xpose 2 years ago, I felt it really slowed me down, it took time to get used to and doesn't provide that much benefit over S3. So I prefer to stick to S3. It's much simpler and since the vpc-package in essence is meant to be fairly simple it should be enough to get the work done. Hadley also seems to like S3: http://adv-r.had.co.nz/OO-essentials.html#picking-a-system

@dpastoor
Copy link
Collaborator Author

Yeah I actually was thinking this morning before I saw your post that these will be so simple we don't need the overhead. Agree on S3.

@billdenney
Copy link
Contributor

This appears to be mostly complete since vpc() is S3 generic, I think. It can probably be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants