It's funny that converting the first example to the second is a common thing a compiler does, Static single assignment [0], to make various optimizations easier to reason about.

[0] https://en.wikipedia.org/wiki/Static_single-assignment_form