We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Would there be any interest in adding dataclasses as a feature, similar to Python's ?
I find that it would help with avoiding initialize boilerplate for the cases where we just want a structured data container.
initialize
Foo <- R6::R6Class( "Foo", public = list( x = NULL, y = NULL, z = NULL, initialize = function(x, y, z) { self$x <- x self$y <- y self$z <- z } ) ) foo <- Foo$new(1, 2, 3)
Foo <- R6::R6DataClass( "Foo", public = list( x = NULL, y = NULL, z = NULL, ) ) foo <- Foo$new(1, 2, 3)
Edit: or possibly just make initialize optional, with a default created for the user that handles their public fields ?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Would there be any interest in adding dataclasses as a feature, similar to Python's ?
I find that it would help with avoiding
initialize
boilerplate for the cases where we just want a structured data container.Currently:
Hopefully:
Edit: or possibly just make
initialize
optional, with a default created for the user that handles their public fields ?The text was updated successfully, but these errors were encountered: