Currently, the assignment operator "=" always creates a deep copy of the right-hand side expression. This prevents unintentional modification of the original object:
However, it has a serious performance impact for large structures, e.g. a huge tree stored in a variant. And it prevents the user from saving a subtree in a variable, so that a modification of the variable affects the original tree. This is useful when working dynamically with a tree of unknown structure:
Introduce new function
- function variant getReference(variant | variant_expression) - function’s effect is that the assignment operator is not the standard make-a-deep-copy-&-assign, but only assign the reference.