4 ms·
I would if Foundation/{App,UI}Kit were open-source. I personally think it's fantastic. The thing is, I actually take offense to people who call a language ugly
by koko775 15y ago
I would if Foundation/{App,UI}Kit were open-source. I personally think it's fantastic.
The thing is, I actually take offense to people who call a language ugly. Just because it doesn't prioritize the kind of expressiveness you desire doesn't mean whining about it makes you cool or a better programmer. What everyone here who says 'Objective-C is ugly and outdated' should be decrying is the relative lack of choice of implementation language for iOS.
I like Objective-C, because I look at it from the point of view of C. It's a systems language with support for OOP that I find completely satisfactory, which prioritizes flexibility, predictability, and maintainability over raw speed and constraints. On the other hand, I love that Java and similar languages in its family can reason a great deal about classes and their interactions, and I love that Python and Ruby step out of the programmer's way when you just want to make something --
-- But to write software for an embedded platform that can be natively fast when needed (the C part of ObjC), but offer a solid OOP abstraction, and to reconcile these two needs as well as expose some of the lower-level workings of the OOP system to the developer when they really know what they're doing and need it? I think Objective-C is hard to beat there. It's a language fitting for projects from small-medium size to very large. It's not the only language that I feel can scale like this, but again; that's a problem (availability of alternatives), not a reflection on Objective-C's language. The language combines the low-level with the high-level, and is many things for many needs, yet is without the rigidity of a Java-style type system, yet is also without the inability or difficulty to deeply reason about high-level language structures as in some more dynamic languages, Objective-C manages to allow sufficient and sloppy "it just works" implementations, for when you just need to bang out code that works well enough, as well as encourages polished and well-engineered APIs (such as Cocoa's).
I think Objective-C balances these concerns - small or big, dynamic or inflexible, as well as the reality of mobile devices' limited memory capacity, particularly well. I would make a more cogent argument were I more awake and if I did not have a splitting headache, but I think it's extremely unfair to call (or imply it) Objective-C strange, or that it survives merely because Cocoa would not be supported if another language were to replace it. Although I may be in the minority (at least amongst those who are posting here in this thread), I think it is a fantastic language.