On Sat, Jun 7, 2008 at 10:38 AM, Jose Raul Capablanca <[EMAIL PROTECTED]> wrote: > I know that Obj-C is more dynamic than Java (and that's quite important for > Cocoa to work its magic), but if Apple had never developed Cocoa and were to > do it now, from scratch, I doubt that they would choose to do it in a > language that sits atop of C. With the exception of the id and SEL types, > categories, and the fact that you can send messages to nil, I can't think of > anything in Obj-C that isn't done better in Java, with the added benefits > that Java has no header files, no include cycles, no pointers, and has > automatic memory management that works (judging from another thread in this > list, garbage collection in Obj-C 2.0 has some wrinkles).
I disagree with your assessment that there's nothing in ObjC that isn't done better in Java, but that's neither here nor there. The fact is that ObjC's C nature is an enormous advantage, not a disadvantage as you paint it. Standing alone, ObjC is at most a mediocre language. (Here come the flames....) It adds nothing particularly remarkable over a language such as Smalltalk and the C integration brings enormous foibles. But that same C integration also brings enormous advantages. You can directly call any C-based library on the system, which is essentially all of them. You can drop in any portable C or C++ code you happen to have, which is often a lot. ObjC by itself is nothing special, but ObjC combined with the enormous amount of external code is extremely powerful. This is the main reason why I continue to use ObjC for most of my programming rather than switching to another language with a Cocoa bridge. > I never understood why Apple stopped supporting the Java bridge to Cocoa. Too much work to maintain (Java's object model isn't really a good match for ObjC, so the bridge was fairly unwieldy) and not enough demand. Note that they've replaced it with bridges to languages which are both better matches for the framework and which don't have their own built-in GUI framework already. The Java bridge never excited me, but having the OS ship with an officially supported Python bridge is fantastic. Mike _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]