Yes, but is the address (memory location) of the first x=5, the same as the memory address of x in the second line x += 3.0. I believe in C++ that it is. The += operator is in place. From the earlier messages in this thread, julia does not update a scalar x in place.
The language standards say nothing about the memory addresses of local variables (unless you specifically compute &x in C++, or if it is volatile), AFAIK. But in both C++ and Julia the compiler almost certainly updates x in-place with the new value. In fact, it probably puts x in a register — it may have no “memory address”!
(Conversely, the “memory location” of a local variable can change over time, e.g. if there is a register spill, and variables can even be optimized completely out of the program. The only time a value should stay in one spot is if you explicitly store it at a memory location, e.g. by putting it in an array or a mutable struct, or if you request a pointer to it in C/C++. And in that case of course you can update that location in-place, e.g. array[i] += 5.0 updates in-place in Julia.)
I think @erlebach is worried more about efficiency? But that is confusing language semantics for compiler optimizations. Even though semanticallyx = 5.0 and x += 3.0 refer to “different objects” (since you aren’t mutating the value of 5.0!) in Julia and in some sense in C++, in practice the compiler will almost certainly store the new value in the same location (e.g. a register, on the stack, whatever).