discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Programming it's a play


From: Dennis Leeuw
Subject: Re: Programming it's a play
Date: Sun, 21 Sep 2003 15:39:59 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020623 Debian/1.0.0-0.woody.1

Pete French wrote:
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...

-bat..


I feels like a chicken and egg story. With the class being the chicken and the objects beings eggs. The whole problem is how do I send a message to an egg :)

Dennis





reply via email to

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