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

OOP #42

Open
JohnCoene opened this issue Sep 9, 2024 · 2 comments
Open

OOP #42

JohnCoene opened this issue Sep 9, 2024 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@JohnCoene
Copy link
Contributor

How should vapour work with OOP (R6, S4, S7, ...)

@JohnCoene JohnCoene added the question Further information is requested label Sep 9, 2024
@JohnCoene JohnCoene self-assigned this Sep 9, 2024
@JohnCoene
Copy link
Contributor Author

JohnCoene commented Sep 9, 2024

They'd have to be handled separately I suspect. R6 is an environment with locked bindings for privates me thinks.

@ltuijnder
Copy link

ltuijnder commented Oct 7, 2024

Hi I just discovered this project and it looks super exciting! I very much wonder how vapour would relate itself to S7.

Since with S7 we create typed class definitions it feels very similar to what is happening with the typed object definition in vapour. Ofcourse with S7 you have the addional syntax to define validator functions and getter/setters and custom constructors. But super interested to see how the S7 version of vapour would look like. Would be so cool for my IDE to know if I type obj@ which properties are available and that it knows which type the obj@prop is.

Would vapour types: https://vapour.run/docs/types be casted to S7 equivalents: https://github.com/RConsortium/S7/blob/main/R/base.R ?

Eg. vapour: num type -> S7::class_numeric

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

No branches or pull requests

2 participants