r-lib / R6

Encapsulated object-oriented programming for R
https://R6.r-lib.org
Other
404 stars 56 forks source link

Do we need `.__enclos_env__` at all? #151

Closed gaborcsardi closed 5 years ago

gaborcsardi commented 6 years ago

AFAICT it is not used by any methods, apart from clone(), so if the class is non cloneable we might not even need it?

wch commented 5 years ago

I think you're right that it's needed only when an object is cloneable. It is pretty handy for debugging in general, though, and the cost is pretty low.

gaborcsardi commented 5 years ago

Yeah.