Re: [Pyobjc-dev] Why syntax?
Brought to you by:
ronaldoussoren
From: Steven D. M. <sd...@mi...> - 2001-04-13 16:33:53
|
On Fri, 13 Apr 2001, Andrew Zeldis wrote: > Is there an archive of your 3-years-ago conversation about this? Maybe > it would be easier to just forward that to me... Although this is > definitely helping me understand ObjC more! There WAS an archive at python.org among the retired sigs section, but now when I try to pull up the archive page, I get a "404 Not Found". But I read thru it a while ago, and I think you've already heard the gist of it. I think it may be worthwhile revisiting this issue later -- [1] since jython can access cocoa classes, it might be worthwhile trying to make the syntax more uniform ( however, there are other differences between jython and pyobjc access to Cocoa classes, so it's probably never going to be source portable, and since Java has overloaded polymorphic methods jython has some extra language support for dispatching to the right method.) [2] I would like to add more introspective capabilities to pyobjc objects -- right now, you can't get any info by doing a dir() on an object as you can with native python objects. As was noted earlier in this thread, there's no list of methods being maintained by the bridge -- you just try calling a method, and if it's not there (I think it calls respondsToSelector: ) it'll return an error. Introspection CAN be added outside of the runtime (I've been playing with the Neo ClassInspector from Python/objc), but if it was added to the runtime, it would add some of the support for more intelligent method dispatch. Right now I'm concentrating on getting what's there working, on figuring out how it works (Bill was using pyobjc back in the Next days, but I'm still learning Cocoa, objective-c and pyobjc plumbing. ) and documenting what's there. I think a redesign and a reimplementation is quite likely in the future: this is version 0.6, and I'ld consider anything < 1 to indicate experimental and quite likely to change. On other big issue it that objc-objects run into the python object-class barrier. i.e. Eveything in Python is an object but not all objects are members of classes. Like lists and dictionaries, pyobjc objects that represent objective-c classes or instances aren't python classes or instances. It would obviously be much easier and less awkward if that was not the case. -- Steve Majewski |