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

finalize method should be private #146

Open
wch opened this issue May 1, 2018 · 3 comments
Open

finalize method should be private #146

wch opened this issue May 1, 2018 · 3 comments
Labels

Comments

@wch
Copy link
Member

@wch wch commented May 1, 2018

I'm not sure why I originally made it so the finalize method was in public. It makes more sense for it to be in private.

@gaborcsardi
Copy link
Contributor

@gaborcsardi gaborcsardi commented May 1, 2018

True, but this is a breaking change, right? Or can you implement sg. that helps the transition? E.g. automatically moving it over to private, with a warning?

Loading

@wch
Copy link
Member Author

@wch wch commented May 1, 2018

Yes, it would be breaking, so it would be a good idea to do something like what you propose. Maybe start with messages and then in, say, a year, upgrade it to a warning.

Loading

@wch
Copy link
Member Author

@wch wch commented Feb 15, 2019

I just released v2.4.0, which allows private finalizers. The documentation now says that finalizers should be private, but they are allowed to be public or private.

In the future -- maybe in a year or so -- we can make R6 start emitting messages or warnings for public finalizers, and then some time after that, we can stop supporting public finalizers. I'm reopening this issue as a reminder.

Loading

@wch wch reopened this Feb 15, 2019
@hadley hadley added the feature label Apr 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants