Winston Chang

Results 285 comments of Winston Chang

Can you please describe the problem (in addition to the example)?

There's no need for an `is.R6` function -- it could just call `inherits(x, "R6")` there. But then there's another problem: in some cases, R6 objects don't have the `R6` class...

Hm, maybe you're right that if `class=FALSE`, the resulting objects should just be treated as environments. So maybe this would be sufficient: ```R if (inherits(x, "R6")) { ... ``` On...

The reason you're running into this issue is that subset assignment in R (with `$

The behavior you're proposing does seem reasonable... but then what do you suggest as the default value for `lock_objects`?

I think it's too late to change the default behavior to not lock objects -- and I think that it's good that they're locked by default. What I meant was,...

One thing to consider is that if an R6 object keeps a reference to its generator, then the object brings along the generator when it's saved.

Yeah, it might be simpler for someone to just create a new environment or list with some functions in it. You might have objects of class `String`, and then a...

For static members, here are some things that would need to be figured out. And then there's also the matter of making sure that it could actually be implemented. (1)...

I think the source of the problem is an interaction between `foreach` and the way that the R6 generator object keeps track of the parent environment. The generator has a...