[Pythonmac-SIG] pyobjc / cocoa

Bob Savage bobsavage@mac.com
Wed, 16 Oct 2002 08:18:40 -0500


On Wednesday, October 16, 2002, at 02:25 AM, Seth Delackner wrote:

> why not:
>
> rt = pyobjc.runtime
>
> rt.call(obj, "message", "arg1name", arg1value, "arg2name", arg2value);
> Which would directly map to:
> [obj message arg1name:arg1value arg2name:arg2value];


On Wednesday, October 16, 2002, at 03:54 AM, Jack Jansen wrote:

> Within the ObjC environment the three methods [object message], 
> [object message: arg1] and [object message: arg1 withFoo: arg2] have 
> absolutely no relationship to each other. Trying to unify these is 
> going to lead to some very ugly code at some point.

I just want to point out one more thing: because these are part of the 
name of the method, and not truly labels, the following two methods are 
distinct:

[obj message: arg1 withFoo: arg2];
[obj withFoo:arg2 message:arg1];

Those are two different methods. This means that the Seth's system 
would not work at all (although I don't like it because it makes the 
relation between the 'labels' and arguments less clear). And of course 
to amplify Jack's point above, there are actually FOUR methods with no 
relationship to each other.

In my opinion, it is a dead end to try to incorporate arguments with 
keywords into PyObjC name mangling.

Bob <-- feel free to ignore him until he finishes his coffee