[Pyobjc-dev] Re: [Pythonmac-SIG] pyobjc / cocoa

Jack Jansen Jack.Jansen@oratrix.com
Thu, 17 Oct 2002 00:32:55 +0200


On woensdag, oktober 16, 2002, at 05:34 , bbum@mac.com wrote:
> We have been down this path a number of times over the six year 
> history of the PyObjC module.  In all cases, we have ended up 
> back with the naming conventions that we have now for a number 
> of reasons.   Moving from double underbar to single underbar 
> was definitely a win -- made the code easier to read and write.

I'm not convinced yet, but you're getting there:-)

You're getting there because you have by far the most experience 
with this beast, so if you say the _ convention is A Good Thing 
and everything else leads to madness: okay, proof by 
authority:-) Also, the point of ObjC-Cocoa programmers moving to 
Python is a valid one.

I'm not convinced yet, though, because I think it depends on the 
target audience. My first impression when I saw PyObjC code 
(about 18 months ago) was "UGLY!! UGLY!! UGLY!!", and I 
immediately stayed away from it for a year. And I've heard of 
more people with this reaction. So, if we care about winning 
existing Python programmers over to Cocoa (which I think we 
should: even though Carbon is going to be around for a long time 
it'll only be interesting to existing Mac programmers, and Cocoa 
has the potential to win over unix and windows Python people) we 
should make sure it looks appealing.

Let's try for a political solution. The official mapping is 
the _ mapping. However, for convenience there are some method 
names that have an alias. This alias is translated early on 
(when looking up the method name from Python, or when creating 
the Python subclass of an ObjC class), and the official name is 
used from then on. Would this be workable?
--
- Jack Jansen        <Jack.Jansen@oratrix.com>        
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- 
Emma Goldman -