Re: Learning Cocoa with RubyCocoa (was Regular Expressions)
Here is one: Integration with other languages Java's integration with other languages (as using Java libraries in other languages) is about one of the worse I've ever seen. It basically makes any Java library accessible to only Java. Yepp - the integration sucks but... And a second one: Performance ...when was the last time you tried java? Really depends on what you are up to. The generality of this statement disqualifies it. cheers -- Torsten ___ 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]
Re: Learning Cocoa with RubyCocoa (was Regular Expressions)
On Jun 7, 2008, at 07:38, Jose Raul Capablanca wrote: Allison Newman said: It's just that I can't help thinking about all of the comments that we see on this list from people coming from Java or some other language where header files aren't necessary, or which don't have pointers. They are confused by these things, and having to learn that at the same time as learning Cocoa itself makes for a very steep learning curve. Indeed. I was one of the Java people you referred to. Nowadays, my day-time job is game programming in C and I dabble on Objective-C/Cocoa when time permits, so I think I've now gotten used to header files and pointers. But those things still feel to me as nothing more than fossils. Yepp - C was the first language I learned. So quite used to it as well. But still - header files are fossils. Totally agree. cheers -- Torsten ___ 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]
Re: Learning Cocoa with RubyCocoa (was Regular Expressions)
Le 7 juin 08 à 22:26, WT a écrit : I still don't see any good-enough *technical* reason to justify basing Cocoa on an extension of C, however. That's all I've been trying to say. WT, I think this is an interesting question (as are your other comments), and I think I have the answer :-) The thing is that Mac OS X is a UNIX system and C is the native language on UNIX (in part because UNIX is itself implemented in C). Therefore, C based languages (i.e., C, ObjC and C++) have a very synergistic relationship with the OS, at the technical level. There have been several serious initiatives to provide new environments based on other languages (from ADA back in the early eighties to Java more recently) , but so far none has been able to displace C-based languages for application development on UNIX based systems, except in the field of in-house enterprise applications or in very specific niches. For instance, look at the "SUN Java Desktop System", which constitutes user-facing layers of Solaris 10, including a complete application suite. Despite its name, it is nearly entirely developed in C/C++. For better or worse, it seems that, as a general rule, the language in which a given OS is implemented is also the most technically apt for application development on that OS. This might not hold true forever, of course. But, in the meantime, I think we are certainly very lucky to be stuck with Objective-C, which is a surprisingly efficient and powerful combination of C and Smalltalk. You'll see that with the new automatic garbage collection in Objective-C 2.0, the main development productivity weakness with regard to languages like Java has been lifted. Philippe ___ 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]
Re: Learning Cocoa with RubyCocoa (was Regular Expressions)
On Jun 7, 2008, at 7:38 AM, Jose Raul Capablanca wrote: I never understood why Apple stopped supporting the Java bridge to Cocoa. Two reasons: First, not enough people were using it to make it cost- effective to maintain, and second, it was sucking up a lot of development time when new classes were added to the frameworks. Java's fundamental deficiencies make it far more difficult to bridge than Ruby and Python. The Java bridge came into existence for political reasons, and those political reasons have become moot. -jcr ___ 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]
Re: Learning Cocoa with RubyCocoa (was Regular Expressions)
I didn't say not to use Ruby if you want. What I took exception to is your statement that "you don't have to fully learn Objective-C's syntax at the same time as Cocoa". Use whatever language you like, but if you're going to use Cocoa, you'd *better* learn Objective-C. -jcr ___ 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]
Re: Learning Cocoa with RubyCocoa (was Regular Expressions)
On Jun 7, 2008, at 9:01 PM, Felipe Monteiro de Carvalho wrote: On Sat, Jun 7, 2008 at 11:38 AM, Jose Raul Capablanca <[EMAIL PROTECTED] > wrote: 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, Here is one: Integration with other languages Java's integration with other languages (as using Java libraries in other languages) is about one of the worse I've ever seen. It basically makes any Java library accessible to only Java. That's not really relevant to the point I was trying to make. Besides, how good is Obj-C's integration with other languages in the same sense you're referring to above? Can Obj-C libraries be used in other languages? I don't think so. And a second one: Performance Again, that's irrelevant, since OS X applications aren't cross- platform. Java applications built to run only on Macs can be compiled natively. Moreover, a performance argument can also be made against Ruby and Python and, yet, there *are* Cocoa bridges for those languages. If people are going to ditch Java as a contender for a native language for Cocoa (in a parallel universe, of course), they should do it for the right technical reasons (in addition to the right non-technical ones). As Michael Ash pointed out, Java's object model is not perfectly matched with Cocoa's, and that's a reasonable argument. I still don't see any good-enough *technical* reason to justify basing Cocoa on an extension of C, however. That's all I've been trying to say. Wagner ___ 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]
Re: Re: Learning Cocoa with RubyCocoa (was Regular Expressions)
Michael Ash said: I disagree with your assessment that there's nothing in ObjC that isn't done better in Java If you read my message again, I think you'll see that I didn't go as far as to say that, or even to suggest it. In fact, I explicitly mentioned features of Obj-C that are useful, and non-existing in Java. The fact is that ObjC's C nature is an enormous advantage, not a disadvantage as you paint it. Once again, I think you undeservedly interpreted my words in an extreme way. I didn't paint Obj-C's C nature as being intrinsically a disadvantage. I merely voiced my opinion that notions such as header files, pointers, and manual memory management are things of the past. Having said that, I *do* think that exposing pointers and requiring programmers to manually manage memory *are* major disadvantages these days, when applications are bigger and more intricate than ever. How many hours of debugging time have been spent tracking memory problems due to mismanaged pointers? ...the C integration brings enormous foibles. But that same C integration also brings enormous advantages. As with anything, it always boils down to a trade-off. Integrating Cocoa with would have its own trade-offs as well. 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. The existence of a large library base is also true of Java. Since every copy of OS X comes with Java built-in, one has access to a large number of well-tested libraries. Case in point: dealing with regular expressions (a recent hot topic in this list). I don't mean to make a case explicitly for Java (or to make a case at all - I'm just voicing an opinion, not making a request for Apple to change anything!). The bigger point I was trying to make is that, as with any language, there are design choices in C that years of practice have shown to have been poor choices. Unfortunately for us, we're stuck with them because Obj-C sits on top of C. All I was trying to convey with my previous message is the suspicion that Apple would choose a different native language for Cocoa if they were to wipe the slate clean and redesign Cocoa from scratch, knowing what we all know today. I say that because of the OO additions (and garbage collection in Obj-C 2.0), because there really isn't anything in C that is essential for Cocoa to work, and because C brings with it features that are either pretty much useless (such as header files) or annoying to deal with (such as include cycles) or downright dangerous (pointers and manual memory management). Wagner ___ 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]
Re: Learning Cocoa with RubyCocoa (was Regular Expressions)
On Sat, Jun 7, 2008 at 11:38 AM, Jose Raul Capablanca <[EMAIL PROTECTED]> wrote: > 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, Here is one: Integration with other languages Java's integration with other languages (as using Java libraries in other languages) is about one of the worse I've ever seen. It basically makes any Java library accessible to only Java. And a second one: Performance -- Felipe Monteiro de Carvalho ___ 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]
Re: Learning Cocoa with RubyCocoa (was Regular Expressions)
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]
Learning Cocoa with RubyCocoa (was Regular Expressions)
Allison Newman said: It's just that I can't help thinking about all of the comments that we see on this list from people coming from Java or some other language where header files aren't necessary, or which don't have pointers. They are confused by these things, and having to learn that at the same time as learning Cocoa itself makes for a very steep learning curve. Indeed. I was one of the Java people you referred to. Nowadays, my day-time job is game programming in C and I dabble on Objective-C/Cocoa when time permits, so I think I've now gotten used to header files and pointers. But those things still feel to me as nothing more than fossils. 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 wonder how much more productive Cocoa programmers are in a parallel universe where Cocoa's native language is Java, with some extensions added to the language to support the extra features mentioned above. I never understood why Apple stopped supporting the Java bridge to Cocoa. ___ 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]
Re: Learning Cocoa with RubyCocoa (was Regular Expressions)
Syntactical transformations, especially those where semantic parity is retained, have never struck me as much of a barrier. I am new to Objective C (though not to C) and have had a lot of experience in Ruby, and I am struck by how structurally similar Objective C and Ruby actually are. The semantic constructs I've developed over the years for Ruby apply quite nicely in ObjC, and I can see why there was a temptation to develop Ruby Cocoa. Anyway, I think some of us are arguing that Cocoa is a semantic framework, while others are arguing it's a syntactic + semantic framework, and I don't really agree. As long as you're able to think about the frameworks in a purely semantic manner, (which honestly requires literacy in multiple syntaxes) then you can code in whatever language makes you happy. That all said, getting to a point where you think about programming in mostly semantic terms takes some experience. Dave On Jun 7, 2008, at 8:52 AM, Hamish Allan wrote: On Sat, Jun 7, 2008 at 8:20 AM, Allison Newman <[EMAIL PROTECTED]> wrote: Really, once you figure out how to translate obj = [[SomeClass alloc] initWithName: @'my name' size: 16] to obj = SomeClass.alloc.initWithName_size('my name', 16) you're ready to start programming with RubyCocoa (assuming of course that you know already how to program in ruby). Perhaps what John meant was that once you've figured out what the translation actually means, you've basically already learned Objective-C (if you already know C). Hamish ___ 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/dave%40popvox.com This email sent to [EMAIL PROTECTED] ___ 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]
Re: Learning Cocoa with RubyCocoa (was Regular Expressions)
On Sat, Jun 7, 2008 at 8:20 AM, Allison Newman <[EMAIL PROTECTED]> wrote: > Really, once you figure out how to translate > > obj = [[SomeClass alloc] initWithName: @'my name' size: 16] > > to > > obj = SomeClass.alloc.initWithName_size('my name', 16) > > you're ready to start programming with RubyCocoa (assuming of course that you > know already how to program in ruby). Perhaps what John meant was that once you've figured out what the translation actually means, you've basically already learned Objective-C (if you already know C). Hamish ___ 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]
Re: Learning Cocoa with RubyCocoa (was Regular Expressions)
On Sat, Jun 7, 2008 at 4:20 AM, Allison Newman <[EMAIL PROTECTED]> wrote: > obj = [[SomeClass alloc] initWithName: @'my name' size: 16] > > to > > obj = SomeClass.alloc.initWithName_size('my name', 16) And in Pascal: obj := SomeClass.initWithName_size('my name', 16); (alloc is called automatically) -- Felipe Monteiro de Carvalho ___ 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]
Learning Cocoa with RubyCocoa (was Regular Expressions)
I can't for the life of me imagine why you would think that. I mean, I'm not theorising here, I have actually done it. My very first Cocoa app was a RubyCocoa app, and my second, a true, full-featured app, is just about done. And you know what, I never did regret my decision to not really learn Objective C. Now, of course, I can readily believe that one of these days I'm going to want to do something a bit more processor intensive, or which needs a better threading architecture than that provided by Ruby. But you know what? When that day comes, I'll learn Objective-C. But what's great about the way that I did it was that I will already know Cocoa at that point. I'll know how undos work, I'll know how to use delegates and data sources, I'll know how Apple has implemented the MVC pattern, and all of this will make learning the bits of Objective C that I am currently blissfully unaware of a very simple task. Really, once you figure out how to translate obj = [[SomeClass alloc] initWithName: @'my name' size: 16] to obj = SomeClass.alloc.initWithName_size('my name', 16) you're ready to start programming with RubyCocoa (assuming of course that you know already how to program in ruby). As an added bonus, if you're typing on a French keyboard, you have less [ and ]'s to type, which is a blessing because the damn things are three-key combos! :-) Anyway, I think I'll stop spamming the list with RubyCocoa advocacy now. It's just that I can't help thinking about all of the comments that we see on this list from people coming from Java or some other language where header files aren't necessary, or which don't have pointers. They are confused by these things, and having to learn that at the same time as learning Cocoa itself makes for a very steep learning curve. The RubyCocoa or PyObjC bridges make it possible to reduce the steepness of the curve. > Le 7 juin 08 à 04:54, [EMAIL PROTECTED] a écrit : > > On Jun 6, 2008, at 2:10 AM, Allison Newman wrote: > >> you don't have to fully learn Objective C's syntax at the same time >> as Cocoa. > > Ok, all kinds of alarm bells just went off. Obj-C is a very small delta from C, and if you avoid learning it, you will regret it. > > -jcr ___ 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]