But it's not really any assignment involved. It's a destructive merge, nothing else. The assignment is necessary only in the current copying operation, since that is a nondestructive merge followed by an assignment.
/ Martin Stjernholm, Roxen IS
Previous text:
2002-11-12 20:15: Subject: Re: More about ADTs
On Tue, Nov 12, 2002 at 08:05:15PM +0100, Martin Stjernholm, Roxen IS @ Pike developers forum wrote:
Ah, ok. Then it's not the assignment that does the copying but rather the merge operation before it. (Besides, the copying in that case is only one level deep while copy_value is recursive.)
you are right, my bad. (so much for quoting from memory :-)
Also, those operations have nothing to do with indexing, so it's not sane if operators for them involve a pair of square brackets.
? assignments to arrays/mappings involve indexing, don't they? assignments to simple types don't have any copy semantics do they?
greetings, martin.
/ Brevbäraren