[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: objective-c: how slow ?
From: |
Marko Mikulicic |
Subject: |
Re: objective-c: how slow ? |
Date: |
Sat, 08 Sep 2001 01:00:11 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.3) Gecko/20010801 |
Richard Frith-Macdonald wrote:
So, with delegation and object A which does not handle a particular
message, passes the message to a delegate object B which executes
the appropriate method, whereas with behaviors, A gets the method from
B and executes it itsself.
Sorry, its only a fact of terminology. I mistaken calling it "true"
as opposed to "not true". I'm grown up with this termin, and many people use it,
but it could be wrong or at least have different meanings.
The behavior mechanism is not directly supported by the language, and
is therefore dangerous in ObjC - since you need to be careful not to
take on any behavior which would try to work with instance variables
that don't exist in your object and cause a crash. In other languages
where ivars are only accessed by methods, you just need to worry about
runtime exceptions, not actual crashes when you make a mistake.
I have a vision about OO language which certainly you won't share (You would be
probably using smalltalk not objc), that instance variable must not be accessed
directly, so that subclasses can overrive ivar access with some method. (for
flexibility). The VM/runtime should optimize out actual unnecessary calls, but
there must be the flexibility.
I don't want to dispute OO desing here. I think I would not be using objc if
there was not OpenStep. I think that NeXT guys created a very confortable
framework (althrough when I first saw these loong method names I felt pain)
where you can be very productive from the beginning. And objc doesn't need any
new feature for OpenStep.
Marko
- Re: objective-c: how slow ?, (continued)
- Re: objective-c: how slow ?, Marko Mikulicic, 2001/09/05
- Re: objective-c: how slow ?, Malmberg, 2001/09/07
- Re: objective-c: how slow ?, Marko Mikulicic, 2001/09/07
- Re: objective-c: how slow ?, Marko Mikulicic, 2001/09/07
- Re: objective-c: how slow ?, Erik M. Buck, 2001/09/07
- Re: objective-c: how slow ?, Erik M. Buck, 2001/09/07
- Re: objective-c: how slow ?, Marko Mikulicic, 2001/09/07
- Re: objective-c: how slow ?, Malmberg, 2001/09/08
- Re: objective-c: dynamic inheritance and s-arrays [was: how slow] ?, Marko Mikulicic, 2001/09/08
- Re: objective-c: how slow ?, Richard Frith-Macdonald, 2001/09/07
- Re: objective-c: how slow ?,
Marko Mikulicic <=
- Re: objective-c: how slow ?, Malmberg, 2001/09/07
- Re: objective-c: how slow ?, Marko Mikulicic, 2001/09/07
- Re: objective-c: how slow ?, Malmberg, 2001/09/08
RE: objective-c: how slow ?, Bissell, Tim, 2001/09/10