Re: [Rd] Reference Classes: how to clone/copy instances?

2010-11-25 Thread John Chambers
No reference class method explicitly does this, but it's a natural utility. Some form of $copy() will be added. It needs a shallow/deep option; i.e., if a field is itself a reference class object, should that field be cloned as well. The full reflectance available should make a single method

[Rd] Reference Classes: how to clone/copy instances?

2010-11-24 Thread Janko Thyson
Dear list, I don't know what's the correct term for this in the OOP context, but is it possible to clone/copy an instance of a reference class (say 'a') so that I get an *autonomous* second instance 'b'? Autonomous in the sense that changes to 'a' do not affect 'b'. I know that this is somewhat