[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programming it's a play

From: Pete French
Subject: Re: Programming it's a play
Date: Sun, 21 Sep 2003 14:18:59 +0100

> I do want to know what this means. Can someone that writes a class, like 
> the Greeter example write his own Class methods or are Class methods 
> just inherited from the root class. Meaning you can only add instance 
> methods.

You can add your own class or instance methods as you like. As long as you
bear in mind that yopu are adding them to a completely different object to the
instance methods.

> What is your view on a class (remember I am a VERY newbie). How can you 
> send a message to a class when a class is not an object.

A class *is* an object - whos primary purpose is to create other objects.
trying to make a distinction between the written description and the
compiled version (which you seem to be trying to do) is only going
to confuse things. 

Its not often that you want to send a message to a class, other than
'alloc' (or 'new' for alloc] init]). The acting school example muddies
the waters a lot if you try and over-extend it to include class objects.
Thats the trouble with all metaphors to try and explain OOP as theres
nothing in the real world which operates in exactly the same way...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]