I am a Noobey in Smalltak, but I need to understand some things for my thesis. What exactly happens when creating a string or any other object? For example, let's do the following:
fruit <- 'apple'
When I try to check the fruit object, I see that it has 5 inst vars. If I prescribed a “pear” to the fruit, she would have 4 instances. Thus, the interpreter created a new instance of bytestring, added the necessary inst vars for each character and assigned them the correct values? I believe that there is something else, but I cannot find it anywhere, and I do not have time to learn smalltalk correctly. Can you explain this to me or give me a link where I can find it?
source
share