Objective-C Comes of Age
New submitter IdleThoughts writes "Sometimes it takes a long time to spark a revolution. Long the ugly duckling of programming languages, iOS' Objective-C passed C# in the 'TIOBE Programming Community Index this month and seems on a trajectory to overtake C++ in the next few. It was invented in the early 1980s by Brad Cox and Tom Love, with the idea of creating 'Software Integrated Circuits' and heavily influenced by Smalltalk — yet another legacy from Xerox PARC, along with desktop GUIs, ethernet and laser printers. It was adopted early on by Steve Jobs' NeXTStep, the grand-daddy of all that is now OS X. It had to wait, however, for the mobile device revolution to have its day, being ideally suited to the limited resources on portable devices. It's still being actively developed by Apple and others, sporting the new automatic reference counting and static analysis in the Clang compiler. It turns out it has supported dynamic patching of code in applications all along. What more surprises does this venerable language have up its sleeve?"
Sad sad day. Objective-C sucks! C# rocks!
In many ways this is true, but then again, they aren't the same kind of languages. I absolutely love C# syntax and the easy readability of the code. .NET libraries are also wonderful, and in general I would rather use C# than Objective-C because of this.
But Objective-C is closer to C and C++ than C#. I would however hope that Apple brings something like C# to OS X and iOS. I would start developing with them right away.
"Even Apple's own old Dylan was a more interesting and innovative as a language than Objective-C."
Agreed. I loved the multi-interface stuff. Why doesn't anyone else pick that up? It would be particularly easy to implement in Bundles. But...
"the availability of libraries is often more important than the language itself"
Bingo. Lets be honest, is any native library set even *remotely* as good as Cocoa out of the box? With the exception of Delphi I've fiddled with them all, and the answer is a resounding "no!". All you have to do is compare the basic text editing widget across libraries and you can draw your own conclusions.
Similar to C#/VB and the other .NET languages...
Not in the least. Windows is not tied to a language (you can use whatever you like), where iOS is. Now I can't comment on what languages are available for Windows Phone 7, or Windows 8 has/will have, but they do not have the platform adoption that iOS does. C# usage is based on its merits, where Objective-C usage is based on Vendor lock-in.
AccountKiller
I find Android apps are not nearly as useful as similar iOS apps. They are usually slower, uglier, and buggier - free or not.
Given the choice between a free Android app that is a turd, and a great iOS app that costs $1, I'll gladly pay the $1.
Also, for developers, I think there is more to it than just the money. With iOS you can test a reasonable amount of the devices on the market and the screen sizes they use. With Android? Not unless you happen to have a few hundred Android devices kicking around and a few months to test your app on all of them. Take into account the absolutely terrible hardware on the currently selling low end Androids that can barely keep up with the iPhone 3GS, the problems with having an app on the SD card instead of on the builtin memory, and then all screen sizes and aspect rations. Ugh.
agreed. when i look at obj-c code it feels like someone's pushing hot pins into my eyes.
seriously.
why have (c-style) syntax for declaring and accessing variables and functions, and a completely different syntax for declaring and accessing bound methods?
it makes no sense. it doesn't add anything semantically to the language. it adds another syntax construct just for the sake of it. completely unnecessary.
and why are properties accessed using c-style syntax, and not methods?