On Friday, 24 July 2015 at 14:12:54 UTC, Steven Schveighoffer wrote:
On 7/24/15 4:47 AM, "Marc =?UTF-8?B?U2Now7x0eiI=?= <schue...@gmx.net>" wrote:
Apart from what others have said, for a class `this` is the _reference_ to the current object, i.e. a "pointer". If the compiler allowed assigning to it, it would not modify the contents of your object.

If you want to assign all of the elements at once, you can use `tupleof`
(untested):

     this.tupleof = other.tupleof;

I'm quite certain this wouldn't copy the derived data. So be careful when doing this, you can only do this on final classes.

Right, this is dangerous for classes.

Reply via email to