A decent Java programmer will have no trouble with Objective-C, once
he or she gets past old syntactic cruft like having to have separate
header and implementation files. You'll probably appreciate the areas
that are quite common -- collections, or how AppKit's main thread has
policies similar to the Swing event dispatch thread. Where they're
different, they're often different for interesting reasons. I now
think a single delegate is more elegant than having an infinite number
of listeners -- how often does more than one object care about click
events from your button anyways?

The hardest part is if you don't have a C background, because sooner
or later, you'll have to drop down to straight C, and if you've never
really worked with pointers before, it can be a rough experience.   I
did a talk on this at CodeMash, probably the most fun I've ever had
doing a presentation: 
http://www.slideshare.net/invalidname/oh-crap-i-forgot-or-never-learned-c-codemash-2010

-Chris

On Apr 9, 2:19 pm, Joey Gibson <[email protected]> wrote:
> On Fri, Apr 9, 2010 at 1:15 PM, Alexey Zinger <[email protected]> wrote:
> > I've never done any real Objective-C coding, but read a bit about it when I
> > was considering getting into iPhone development.  It is my understanding
> > that initially Objective-C came with no memory management, but has since
> > attained garbage collection.  This means that one has to decide from the
> > start which way they want to go and pick libraries/frameworks accordingly.
> > Searching for "object c garbage collection iphone" revealed a number of
> > interesting resources, including this 
> > one<http://memo.tv/memory_management_with_objective_c_cocoa_iphone>
> > .
>
> I've done a little Mac programing and a little iPhone dev in Objective-C.
> Originally, I thought it was pretty cool. I've written tons of C and
> Smalltalk, so seeing a mashup of those two seemed neat. And for the first
> few months, it was OK. It gets really tedious after a while. Having written
> Java for 15 years, and done extensive work in Ruby and The Groovy, I found
> Obj-C to be an anachronism that wasn't much fun to work with.
>
> I will say that Xcode (make sure you capitalize it like that when you post
> on an Apple forum, or you will be soundly bludgeoned by the hardcore guys)
> and Interface Builder do make knocking up a UI with working parts pretty
> easy. Java UI builders could learn a thing or two from IB.
>
> As for memory management, it's true that Objective-C 2.0 has garbage
> collection, but this is ONLY on the Mac. The iPhone has no GC, so you have
> to use the regular Obj-C reference counting methods. You can use Autorelease
> Pools, to relieve yourself of some of the burden, but I've read several
> articles frowning on those, so YMMV. When you are doing reference counting,
> you have to ensure that anything you allocate, you release at some point;
> otherwise leaks ensue.
>
> Joey
>
> --
> Blog:http://joeygibson.com
> Twitter:http://twitter.com/joeygibson
> FriendFeed:http://friendfeed.com/joeygibson
> Facebook:http://facebook.com/joeygibson

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to