From: Jim I. <ji...@ap...> - 2002-03-21 22:19:44
|
On Thursday, March 21, 2002, at 02:06 PM, Steven Majewski wrote: > > > On Thu, 21 Mar 2002, Jim Ingham wrote: > >> BTW - IMO, much of the time C interfaces are not a good match for the >> interfaces you want from a scripting language - the design goals are >> different. So this sort of autogeneration is mostly useful as a "first >> cut" kind of thing. For instance, Tk is MUCH more useful than a >> straight wrapped version of Carbon would be. Not sure whether this is >> so true of AppKit since the API's are already at a pretty high level. >> But I bet Tk would still in the end be more convenient... Similarly, >> QuickTimeTcl adds a movie object that you create and manipulate, which >> is not the way the C API's are written, but is more convenient from >> Tcl... > > From my experience playing with both Tcl/Tk (and Python/Tkinter) > and Cocoa w/Python+pyobjc, I would say that if you have to do everything > programatically (which is the case right now) then Tk is definitely > easier than Cocoa, but if we can ever get Python+Cocoa to work with > Interface Builder nibs, then Cocoa would be much more convenient. > Yeah, it would be cool to be able to do what the AppleScript Studio folks do in other languages. I don't know how this works, however, so I don't know how easy it would be to retool... > Tcl/Tk is very procedure oriented, and the procedures to create and > layout objects are very concise. > > Cocoa is very object oriented, and was really designed to work with > I-B's 'frozen objects' -- if you have to actually write procedures > to create all of your objects, then Cocoa becomes more of a pain to > use. > Yes that's probably right. > > BTW: Jack's code is not as general purpose and flexible as SWIG, but, > being special purpose, it produces better wrapper code for MacPython. > I see... The new version of SWIG looks pretty nice, particularly for wrapping C++ stuff (you can generate little Class factories, and then the methods hang off the created objects, which is convenient). He says there is also support for ObjC, but I didn't see any docs about it. Jim -- Jim Ingham ji...@ap... Developer Tools - gdb Apple Computer |