I’m new to Julia, but not to programming, so to help me learn, I’m writing some notes and training material.
While reading Python Crash Course, the author describes a variable as:
Variables are often described as boxes you can store values in. This idea can be helpful the first few times you use a variable, but it isn’t an accurate way to describe how variables are interpreted in Python. It’s much better to think of variables as labels you can assign to values. You can also say a variable references a certain value.
This site also says the same:
If you imagine that variables are like boxes, you cannot make sense of assignment in Python. For an assignment, you must always read the right-hand side first: that’s where the object is created or retrieved. After that, the variable on the left is bound to the object, like a label stuck to it. Just forget about the boxes.
I’ve used Python for sometime now, and I’ve always thought variables are containers or boxes for values. This video also uses the box metaphor to describe variables.
In Julia, what is the correct way to interpret variables, labels or boxes ?