2 ms·
Classes have several roles. They can indicate type. They allow meta programming (where a car is seen not as a car but as a bunch of stuff in the computer's memo
by jecel 7y ago
Classes have several roles. They can indicate type. They allow meta programming (where a car is seen not as a car but as a bunch of stuff in the computer's memory). They allow shared state for their instances.
With objects that can directly inherit or delegate from each other you can put shared state in a parent object.
For the role of type the Self VM used things called "maps" that were not visible at the language level.
For meta programming Self introduced "mirror" objects.