Variable binding: (re-) assignment, argument passing, `let`, scope

I think I’m starting to see where you’re coming from. You’re talking from the perspective of so-called “language semantics”, which (in my simplistic understanding) describes what the computer should and should not do with this or that input string taken by a conforming implementation of the language. Like a specification.
And from this perspective, Julia’s language semantics does not involve “memory locations”, or doesn’t even mention them. – I have no problem with that!
By consequence, the language semantics does not guarantee or imply one or another thing about memory locations - including existence or nonexistence.

No, it doesn’t blow my mind; it’s just your opinion.
If you’re saying this from the perspective of lang. semantics as I explained above, then all fine…skip 1 paragraph.
But if not from that perspective, then it seems like either:

  • you’re not sure whether that bit pattern exists anywhere (or even think it doesn’t exist)
    I am sure that it does exist somewhere (regardless of any number of layers of compilations and other software between what I type on screen, and the result I get back).
    And if you’re repeating that over and over, it doesn’t convince me and should not convince anyone who can think for themselves :slight_smile: (and have some elementary computer science brackground )
  • or , we have a language / philosophy barrier here. Maybe your notion of “exists” is different from mine. Arguments often happens due to different meanings for different people. Peace!

With that out of the way.
Unlike yourself apparently, in this post, I did not set out to adhere strictly to that language semantics.
So I don’t see the value of “you must not talk about memory locations here” or “you should that and should not that” (You sound dogmatic or even authoritarian ):
of course I can talk about anything that helps my understanding.
And one such thing is memory location for me, even if lang semantics does not mention it, and even if it’s not helpful to you.
Some people learn/understand things better when they are grounded, not just abstract, and mem. location is the missing grounding thing (to me at least) between name and value.

x = 1; x = 2; semantically first bind x to the object (value) 1 and then bind it again to the object (value) 2 . Absolutely no values are overwritten.

Maybe they are overwritten. It’s compiler’s business. Language semantics doesn’t tell you that, so you can’t know it :wink:

The different addresses you see is absolutely not part of the language semantics.

In that case, I definitely don’t care that much about “language semantics” , if it doesn’t include things that are build in Julia language to use/explore.

No. It does not imply anything about “location in memory”. It just mean the two variable reference the same object, period, no implication on memory.

That’s from your “language semantics” perspective. But in general, if 2 vars reference the same object, and if the object is mutable, then I’m pretty sure that object is in 1 place, not 2 places in memory

Nop.

Yep.

The only location related to a variable stores the reference to an object, not for the value (see above).

Don’t mention location ! it’s not helpful in this discussion! :wink:

And yes, semantically, storing locations (for the value) don’t exist.

Correct! I fully agree with this sentence! (provided “semantically” means from that (theoretical) lang. semantics point of view)

I’ll just repeat that your understanding of scope shouldn’t involve understanding assignment.[…]

Right, you’re (just) repeating yourself. I’ve addressed this concern of yours in my prev. reply.

My conclusion:
There’s more than one way to understand things, what works for you may not be the best for others. You don’t have to agree with me, and I respect your personal opinions.