r-lib / R6

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

Clone a class? #139

Open gaborcsardi opened 6 years ago

gaborcsardi commented 6 years ago

This would be handy in the case when you want to emulate multiple inheritance, by just set()-ing methods on a class.

However, modifying an exported class might break other packages that use it, so it would be great if we could clone it.

wch commented 6 years ago

That does sound like it could be useful. I'd be happy to look at a PR.