Now I found the duplicate() function while writing this and it makes me think that this might not be a bug after all, but it does seem like odd behavior since other types of variables don’t function like this (at least the ones I’ve tested).
The assignment only copies a reference to the original structure. This is also true for all objects and dictionaries and is by design. Use the duplicate() method to assign a duplicate of the array.
Fair enough. Though I can’t see why it would ever be useful. But yea had figured out duplicate() was an option.
MOSN | 2019-04-21 09:14
This is quite common, also in other languages (i.e. JavaScript). Normally, copying complex data structures can take quite a bit of time (& sometimes memory) so the default behaviour for all complex datatypes is just assigning by reference.