3 ms·
“Are the variables "copied"?” Thinking in terms of C-style variables may be unhelpful. Instead, consider Smalltalk “variables” as scoped names bound to heap-al
by hhas01 7y ago
“Are the variables "copied"?”
Thinking in terms of C-style variables may be unhelpful. Instead, consider Smalltalk “variables” as scoped names bound to heap-allocated objects. You can bind as many names as you like to a given object at any time, and each name is usable within the bounds and duration of its scope.
What the VM does under the hood is more complex than that, natch, but as long as the user-level abstractions don’t leak (which they shouldn’t) the mental model works.