Hacker News new | ask | show | jobs
by mirkules 5672 days ago
The feeling you get with XCode is that it slows you down. I'm a java developer by day, iPhone dev by night. Eclipse/Java are _light years_ ahead of XCode/Objective-C. My gripes with XCode include everything from the build process, the awkward debugger, Interface Builder, and all the way down to little minutiae like key bindings that just don't make sense (try selecting a block to indent it, every other IDE in the world uses tab, XCode uses Cmd-] wtf?).

Not to mention Objective-C, which, as you allude to with garbage collection, is a far more inferior language than java. There's things like passing undefined messages to objects which only generate warning at compile time, and sometimes those warnings don't appear in XCode -- so when your code doesn't work, you're left scratching your head. And why isn't the + operator overloaded for string concatenation?

Finally, Objective-C is a very awkward language to use at the keyboard. Object notation [] in particular slows me down a lot - somehow (at least for me) it's easier to type () than it is to type [].

Thanks for the article, now off to download the android SDK!

P.S. I'm not saying Java is a very elegant language - far from it - but, in my opinion, it's more elegant than Obj-C.

2 comments

  every other IDE in the world uses tab, XCode uses Cmd-]
  wtf?
Textmate uses ⌘[, skEdit uses ⌘[, CSSEdit uses ⌘[, Coda uses ⌘[, BBEdit uses ⌘[.

Objective-C for me personally is probably the second language by elegance after Ruby.

Sure, but as counter-examples, take Eclipse, Visual Studio, Netbeans, Notepad++, Textpad, XMLSpy...

From your example, it's apparent that Mac-only editors use cmd-[. This is a great idea as it promotes cross-platform compatibility and makes life so much easier for developers. /snark

Likewise, I have a problem with Visual Studio and Eclipse, and their debuggers: F6 is step-over in Eclipse, and F11 is step-over in Visual Studio.

By the way, try using the Visual Studio debugger in a virtual machine on OS X. Another example of an awesome key-binding in OS X (who uses F11 anyway? Let's assign it to something system-wide!)

+1 on the IDE stuff of your comment.

But Objective-C is a really nice OO language. It seems you do not get its dynamic nature. Yes, its different, but by no means inferior. And yes, tooling is much better for static languages like Java.

You may be right that I don't get Objective-C. I understand that you're not actually calling methods on objects, but instead passing messages to it. What I don't get is why the IDE and the compiler accept invalid method (message) signatures. For example, if you tried [[UIView alloc] mymethod], XCode won't say anything (unlike Eclipse which would catch that mymethod does not exist), and if you try compiling it, you will only get a warning: "UIView may not respond to mymethod". On top of that, XCode won't always display that warning, so you can run into some serious trouble.

Even if XCode were consistent, suppose you are working with some frameworks (like OpenFeint) which, when compiled in your code, have a couple of warnings here and there. How do you tell your warnings from theirs?

More importantly, calling a method (or passing a message) with an incorrect signature should absolutely be a compile-time error.

I'm not trying to be facetious here, I really do run into these problems. I'm genuinely asking why Objective-C and XCode should be considered on equal footing as some other languages?

(P.S. I'm really fired about XCode and Obj-C because I work with it almost daily and these things bother me to no end, so hopefully you're not interpreting my passion for wanting to improve these tools as smugness or arrogance directed at you)