| > What about it makes it painful? 1. Verbose, it's very hard keeping ObjC code in 80 columns (if you linebreak too much it's completely unreadable) 2. Lack of generics make the code not feel as safe as the verbose presence of types everywhere would make you think 3. I hear Xcode 4 improved things (and appCode is an actually good IDE), but Xcode 3-generation tooling really is quite terrible, I miss having errors display as I type. Also the autocompletion is garbage, it's barely as good as dynamically typed languages 4. NO NAMESPACES 5. Many solutions feel old/hackish: separate interface/implementation files, macro-looking code (@property/@synthesize never feels right), objective context ("[" and "]", especially as you're repeating them all the bloody time), the severe dichotomy between objects and values or structs requiring things like content wrappings/unwrappings in NSValue (and then there's bloody `id`, which does not look like a pointer but is still an object) stuff like that. I don't really feel good coding in Obj-C, the frameworks are very complete and often wonderfully thought but I really have a hard time enjoying the language. |
2. Totally understand. I've used generics in Java/C# and I've definitely run into instances where I would have loved to have them.
3. Xcode 4 is great for code competition and much better at reporting errors.
4. I haven't worked on massive projects where namespacing could potential be a problem. The 2 character namespace for each class has worked great for me. But again I can totally understand how someone could dislike this.
5. id is amazing. The dynamic nature of Objective-C is the thing I like most about it. Having to wrap ints in NSNumber does get old I admit but id combined with protocols removes so much of the need to cast EVERYTHING in Java/C# before you can perform something on it.
What do you mean by frameworks are incomplete? Third-party frameworks I can understand because there are a lot of novice Objective-C programmers out there making their code available but Apple's frameworks have been near bulletproof for me. Sometimes they are limited (which is Apple's way of forcing you to do things like they do) but in the end if I you need to heavily customize something you can access CoreFoundation and do whatever you need.