[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Programming it's a play
From: |
Nicolas Roard |
Subject: |
Re: Programming it's a play |
Date: |
Sat, 20 Sep 2003 18:09:02 +0100 |
On 2003-09-20 15:44:49 +0000 Dennis Leeuw <dleeuw@made-it.com> wrote:
Hi all,
I picked up working at the Objective-C programming guide. The last couple of
weeks I have been working on the Guide and have been reading a lot of
documentation. The more I read the less happy I was with the Wheel example
off the current Guide for Classes and Objects.
So I need an new idea. The following is what I came up with to explain the OO
programing terms. I would like people to review the following text to see if
that can be used as an explanation of Objective-C programming.
Well, the actor metaphor is a good one, mainly to explain polymorphism.
But I'm not very fond of of the metaphor a Class == an Actor, and
an Object == an Actor's performance ...
Because generally, objects (classes instances) are considered as living
entities,
acting on their own -- it doesn't fit well with a performance of the same actor
somewhat,
as they generally don't happen at the same time and don't cooperate :-)
I would prefers the metaphor a Class == an actor school, an Object == an actor.
Each objects are separate entities (actors) and could communicate between them
and act togethers to play (ie, they runs the program)
Thus, the "learning lessons" part would be the object's creation (class
instanciation).
Calling a method is effectively sending a message to an actor. What's good imho
is to stress the fact of considering objects as separate entities, acting
togethers,
where you could send the same message to all of them and they will act
differently.
I'm not sure the actor metaphor is a good one to explain inheritance -- perhaps
another metaphor would be more suited to expain that part of OOP.
--
Nicolas Roard <nicolas@roard.com>
PGP : http://www.roard.com/download/key.gpg.asc
http://www.petitiononline.com/laafs/petition.html
Work for something because it is good, not just because
it stands a chance to succeed. - Vaclav Havel
- Programming it's a play, Dennis Leeuw, 2003/09/20
- Re: Programming it's a play, Edward Dore, 2003/09/20
- Re: Programming it's a play,
Nicolas Roard <=
- Re: Programming it's a play, Dennis Leeuw, 2003/09/20
- Re: Programming it's a play, Nicolas Roard, 2003/09/20
- Re: Programming it's a play, Pascal J . Bourguignon, 2003/09/20
- Re: Programming it's a play, Dennis Leeuw, 2003/09/21
- Re: Programming it's a play, Pete French, 2003/09/21
- Re: Programming it's a play, Dennis Leeuw, 2003/09/21
- Re: Programming it's a play, Pete French, 2003/09/21
- Re: Programming it's a play, Pascal J . Bourguignon, 2003/09/21
- Re: Programming it's a play, Dennis Leeuw, 2003/09/21
- Re: Programming it's a play, Pascal J . Bourguignon, 2003/09/21