3 ms·
> in my mind variables are their bindings This feels like flawed thinking to me. I know what you're saying, but claiming that variables are mutable would lead
by sodapopcan 6y ago
> in my mind variables are their bindings
This feels like flawed thinking to me. I know what you're saying, but claiming that variables are mutable would lead me to believe we could have things like counters. I would say it's best to think of variables as the memory address of their binding. We are allow to rebind the name. That's how I see it, at least.
- dnautics 6y agoThat's not at all the traditional definition of variable. A variable is the code-lexical representation of a value in memory. (Think "variable" in algebra, which is the formula-lexical representation of an abstract value). Anyways we can't have traditional counters, because of 1) lexical scoping rules and 2) value immutability.