Re: [Pyobjc-dev] Re: [Pythonmac-SIG] pyobjc / cocoa
Brought to you by:
ronaldoussoren
From: Seth D. <se...@jt...> - 2002-10-17 01:03:00
|
On Wednesday, October 16, 2002, at 03:10 , Bob Ippolito wrote: > > On Wednesday, Oct 16, 2002, at 17:45 America/New_York, bb...@ma... > wrote: >> However, I completely fail to see how... >> >> rt.call(obj, "drawSelfAtPoint", p, "color", c, "withSize", "s") >> >> ... is cleaner/clearer/better than... >> >> obj.drawSelfAtPoint_color_withSize_(p, c, s) > > It's not. Though, I can see how it'd be kinda useful in strange cases > to have the "rt.call" function around. I'll never 'win' this discussion, as if that is meaningful, but the syntax serves another purpose. The main reason I like it is because I don't like calling conventions that list parameter names and values in separate places. With the underscore convention, you have essentially (pseudocode): call((a,b,c), (1,2,3)) when the *meaning* is call(a=1, b=2, c=3). But I'm definitely not the target audience for pyobjc, so I would ignore all of my comments at this point. I love Python and I love Objective-C. I see no reason to write GUI Cocoa code in Python when Objective-C does it perfectly and the GUI api was meant for use with Objective-C. I thus think it would be far more useful to have a simple way to link an Objective-C nib-based GUI controlled by a Python backend, with convenience wrappers to convert complex library types like dictionaries and mutable arrays. |