Reply to Message

The "holes" in objects
What I was getting at was things like this:

Public MyClass
{
public int myField;
...
}

You can't do this in Smalltalk. Never. It doesn't even give you the option. What you can do is have an accessor method, something like:

myField
^myField
(The first line is the method name. "^" means "return". "myField" after the carat is the name of the instance variable) which is the simplest form of this.
Posted by Mark Miller
13th Jun 2011