On 18/12/2007, Chris Cunnington cunnington@sympatico.ca wrote:
On 12/18/07 2:16 PM, "Andreas Raab" andreas.raab@gmx.de wrote:
Basically, what you are missing is the distinction between instances and classes
The map is not the terrain. The classes are just templates, but people from the C world think that this is what's real. The instances are what's real. The classes are not the objects. (The classes are objects but, frankly, who cares. Metaclasses are somebody else's problem.) The instances are the objects. In Smalltalk you are dealing with a visible world of classes, which is false. And the real world of instances, which you can only see through the windows of the Inspector and the Explorer. You need to learn to see into two worlds, and not rely on the one, the System Browser, staring you in the face. The problem is added to, because classes are written to be as general as possible for maximum reuse. While the instances are as specific as possible. Unique, in fact. The leap to the dynamicly bound, loose typing world is weirder than you think... Not for nothing are we associated with Lisp.
I can't agree with you on this. Classes are just objects, instances of own metaclass. Any object (including classes) refers to it's class. And to learn what object can do or can't, you may send #respondsTo: to any object in system.
But, for classes, there is a special methods which can describe a properties of it's instances, like: -methods of instance -it's variables e.t.c.
In this way, you can explore many of instance properties without creating them.
Chris