Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up`finalize` method should be private #146
Comments
|
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? |
|
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. |
|
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. |
I'm not sure why I originally made it so the
finalizemethod was inpublic. It makes more sense for it to be inprivate.