Hacker News new | past | comments | ask | show | jobs | submit login

Objective-C has some huge warts (XCode crashes is a big one), while the standard library might be decent, it's much more difficult than it needs to be to package modules for iOS.

What sucks about Java is not the standard library but the line noise. I'm not sure that Obj-C improves much in this regard. Blocks are definitely an improvement over java but again, way too much line noise. Selectors are much better than the java reflection system, as well are categories.

If you compare Obj-C to C# there isn't really much to write home about. In C# it's a bit more difficult to use C but not much and it's tightly integrated enough into the OS that the GUI issues are largely non-existant. The MVVC system does leave something to be desired though, not really sure how much better xib is than xaml, as I tend to avoid both.

There are definitely a class of apps (games) that benefit from the tighter integration with C but in that case I'd look to managed C++ as a comparison, and not java.




I don't think it is quite fair to call Xcode crashes an Objective-C wart. It has nigh-unto absolutely nothing to do with the language, and you can of course execute the compiler directly.

I'd be interested to know what other things you consider warts - of the language, not the utilities. Apart from blocks (which seem to have a clear, concise syntax: certainly cleaner and more concise than lambdas in C++11.)


Yes, to be fair it's an iOS development wart, part of the Obj-C ecosystem. The only reason I'd use Obj-C is to write iOS/Mac apps so it's part and parcel for me. I tend to expect tools that I pay $99/year for to work.

Yes, it's possible to work around all these issues but once you've worked around them you no longer have a very good development environment and are back to vim + make/xcodebuild. Lets not even get into the horrid bugs still present in clang (although arguably this is a defect in the compiler and not the language).

Blocks may be more concise than lambdas in C++ but they are even cleaner in C# and F#. I'd actually prefer a hybrid between the two where there was no return necessary for multistatement lambdas in C# and no fun keyword required in F#. Yes, I'm picky about what I like and dislike in languages.

The __block keyword is also fairly annoying.

The biggest warts for me are the impedance mismatches between various parts of the system.

Primitive types and NSObject mismatches

blocks, function pointers, and selectors (a selector should also be able to capture the object for which it is invoked), similar to how C# works out the differences between methods, delegates, and lambdas.

Also, the lack of generics, although I do appreciate essential lack of type system and ability to violate method signatures if one so chooses. At least in Obj-C the lack of generics conveys some ostensible benefit even if utilizing it is poor form.


>I tend to expect tools that I pay $99/year for to work.

Really? Because you can find tools that crash ever for 1 million/year...

If anything $99/year is on the very low side. I wouldn't expect anything to be bug-free at that price point. Have you tried any other large package, from Autocad to Creative Suite to SAP? Do they work 100% of the time?


No they arent bug free, but they generally don't crash / stop working in some significant way every hour or two. Xcode is buggy as hell, on par with windows 9x. I've used autocad back when it ran on Dos and it wasn't that buggy, same with creative suite. It's worse than vs.net 2002.

4.3.1 does seem to be better.


Keep in mind that 4.x is an almost complete rewrite, too.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: