quite a long question, hence the 500 points. also an "advice" question, rather than a right or wrong, so points will go to whoever can help me out.
i'd really like your advice on learning Objective-C. i'm a Windows user, an internet application developer, expert in XHTML, CSS, JavaScript (a JavaScript "Master" on this site), thorough knowledge of PHP and MySQL, and have dabbled with Cold Fusion and ASP.
despite never owning a Mac, i love Apple products (i've had four iPods), and bought an iPhone the second it was available in the UK. i watched with great interest - to say the least - the Apple iPhone SDK press conference a couple of weeks ago, and i'd really like to move towards developing applications for the iPhone - the problem is, i have no experience of Objective-C or ANSI C for that matter.
so, what i'd like to know is this...
- to learn Objective-C, do i first need to pick up at least the fundamentals of ANSI C? or can i just jump straight into Objective-C, perhaps as a result of my previous "programming" experience (PHP, JavaScript)? - i understand that the iPhone SDK will only run on Mac OS, but is there some way of developing Objective-C on a Windows machine while i'm learning (i want to see whether i actually *can* write Objective-C before i buy a Mac)? - if you believe that i really should play with ANSI C first, how do i go about setting up an environment on a Windows machine, if this is at all possible? - any other advice would be greatly appreciated.
Objective-C is really a superset of C so knowing C really. But for learning OO is C not a very good tool Objective-C is but you have to do OO programming right from the start and that's not that natural. E.g output can be simple done by printf functions, but then there might be the problems with manual memory allocation which now has changed in Leopard on Apples where GC is "build-in" but it's not elsewhere.
good for learning Objective-c is also learning Smalltalk. If you know Smalltalk you can start writing Objective-C code very soon. Of course you have to declare variables in Objective-C this can reach from very type specific (NSString eg) to totally unspecific id someThing;
apple also has a nice introduction to Objective C on their pages at:
I really appreciate the wonderful C extension, which Objective-C is, but unfortunatly the biggest competitor on the Market (well if one can talk from Market with FOSS) GNUstep is way to flaky, the tools are bad and especially debugging is extremly painful. Objective-C deserves better so best is to get some Mac OS X (IMH) because Objective C is really supported and used there
You don't necessarily need to learn ANSI C. There is a very good book called "Programming in Objective-C" that introduces without assuming prior knowledge of C, which all other tutorials you'll find will. You probably won't find it on the shelves at your local bookstore since it's five years old now, so if it's not at your neighborhood library you can conveniently order it from my Amazon affiliate store:
I recommend that you read that book some way or other, and then you'll have a handle on whether you dig this Objective-C thing at all. If you do, then buy a Mac. It is barely possible to scratch out ObjC programs under Windows with gcc-based toolchains ... but you really, seriously, don't want to bother with that. If you're interested in the iPhone, then get the iPhone SDK, don't waste time.
I'll second Alex's vote for Programming in Objective-C. Note, though, that Kochan's main website is having trouble, and he has posted a .Mac homepage at http://web.mac.com/steve_kochan/My_Home/Objective-C.html with errata, example code, and answers to the exercises in the book.