Re: [Pyobjc-dev] Calling methods on nil
Brought to you by:
ronaldoussoren
From: Just v. R. <ju...@le...> - 2003-05-09 07:48:56
|
Marcel Weiher wrote: > > Bad example (I'm calling _this_ method on _that_ instance, I don't > > see what's implicit about that), > > Well, you aren't "calling" a "method" on an instance. You are sending > a message to that instance, and that's not just a difference in > wording, although getting the terminology right also generally helps. That's just a matter of perspective. In Objective-C you call it "sending a message to an instance", in Python we call it "calling a method". The mechanics differ, but it's the same thing (OO with dynamic method dispatching). PyObjC demonstrates that clearly. However, the differences in the mechanics between Python and Objective-C make that "sending messages to nil" is a viable construct in Objective-C, but not in Python. (I agree with you there's some implicity involved in method calling, it's just that it doesn't feel that way to me since the rules are clearly defined.) Just |