Slide 1 / 15
The limitation of pass-by-value
We saw that pass-by-value gives the function a copy. The original is safe — but what if you *want* the function to modify the original?
For example: a swap function needs to actually exchange the values of two variables in the caller. Pass-by-value won't work because it only swaps the copies.