> I can at least conceive of situations in which I might care about the benefits that come with using Objective-C et al than I care about how verbose dictionary initialization is.
Fair enough. I'm interested to hear more about what these situations are.
For what it's worth, my point isn't limited to dictionary initialization. That example, though, does represent a lot of what makes Objective-C painful for me. That list also includes its extreme verbosity; the need to box and unbox native types when storing them in containers (or passing them to performSelector: and friends, and other uses); the necessity of separating header and implementation files; requiring forward declarations of methods to avoid compiler warnings; simply adding an ivar as a property requires touching code in a minimum of 3 different locations, and potentially across 2 files (@property statement, @synthesize statement, call to release in dealloc (until ARC), and, pre-iOS 4.0, actually declaring the ivar in the class definition); and, of course, manual memory management, which includes worrying about fairly esoteric edge cases like retain cycles.
None of these things are hard, including memory management. But it is code that has to be written, and more code means more bugs. In almost all other mainstream web languages, the computer takes care of these things for you, as it should.
Tack onto all of that the fact that if you're running Objective-C/Cocoa as a web app, you're probably on your own in terms of finding solutions to problems from the community online -- at least compared to mainstream languages -- and it feels to me like it's hard to justify the tradeoff unless you have a very specific need.
Fair enough. I'm interested to hear more about what these situations are.
For what it's worth, my point isn't limited to dictionary initialization. That example, though, does represent a lot of what makes Objective-C painful for me. That list also includes its extreme verbosity; the need to box and unbox native types when storing them in containers (or passing them to performSelector: and friends, and other uses); the necessity of separating header and implementation files; requiring forward declarations of methods to avoid compiler warnings; simply adding an ivar as a property requires touching code in a minimum of 3 different locations, and potentially across 2 files (@property statement, @synthesize statement, call to release in dealloc (until ARC), and, pre-iOS 4.0, actually declaring the ivar in the class definition); and, of course, manual memory management, which includes worrying about fairly esoteric edge cases like retain cycles.
None of these things are hard, including memory management. But it is code that has to be written, and more code means more bugs. In almost all other mainstream web languages, the computer takes care of these things for you, as it should.
Tack onto all of that the fact that if you're running Objective-C/Cocoa as a web app, you're probably on your own in terms of finding solutions to problems from the community online -- at least compared to mainstream languages -- and it feels to me like it's hard to justify the tradeoff unless you have a very specific need.