Consider the following code:
ClearAll[x, y]
x = y;
y = 2;
?x
?y
This will store $x$ being equal to the variable $y$, and $y$ having the value of $2$.
Now switch the assignment lines:
ClearAll[x, y]
y = 2;
x = y;
?x
?y
the internal representation will be $x=2$, $y=2$, since at the time of the assignment $x=y$, the value of $y$ is known and used for the assignment, not the variable $y$ itself, as it has been in the first case.
Now consider the case where I've built up a long code with complicated expressions being substituted into each other, and at some final point I would like to boil this down as much as possible.
Stated differently: How would I make sure $x$ is updated to the value of $y$ in the first example instead of still referring to $y$?
