Live data from Hacker News

I loved C. But it always fell short for me. Objective-C fixed that.

red-sweater.com

21–30 of 82 posts

Re: I loved C. But it always fell short for me. Objective-C fixed that.

#21

The only thing I really don't like about Objective C is that message passing is considerably slower than function calling. You just can not manipulate an image using the `setPixelX:Y:` method in anything close to real time. Using functions in C, this is no problem. So, there you go: Write your algorithms in C, write your program logic in Objective C. Oh, and I love how the OpenGL C API interacts so nicely with Object…

This is why the graphics APIs are C.

Also, if you're calling an Objective-C method and dynamic dispatch is causing measurable performance issues, you can cache a pointer to the C function that backs the method (called the IMP) via the class_getMethodImplementation() runtime API.

Re: I loved C. But it always fell short for me. Objective-C fixed that.

#22
post #14

Would anyone care to comment on the state of Obj-C outside the Mac/iOS platforms? The impression I get from previous posts on this is that the utility of Obj-C is closely tied to the functionality provided by the (proprietary) Cocoa platform. Since there are so many developers from outside the Apple ecosystem learning Obj-C in order to develop for iOS, is there any signs of a movement in the other direction? Are deve…

There's GNUstep.

Re: I loved C. But it always fell short for me. Objective-C fixed that.

#23
post #14

Would anyone care to comment on the state of Obj-C outside the Mac/iOS platforms? The impression I get from previous posts on this is that the utility of Obj-C is closely tied to the functionality provided by the (proprietary) Cocoa platform. Since there are so many developers from outside the Apple ecosystem learning Obj-C in order to develop for iOS, is there any signs of a movement in the other direction? Are deve…

I get the impression most developers use Objective-C because they have to, rather than because they want to. Take a look at the Tiobe graph for Objective-C:

http://www.tiobe.com/index.php/paperinfo/tpci/Objective-C.ht...

I have a feeling it would see a distinct dropoff in usage if Apple were to change their focus to, say, Java or C++.

Re: I loved C. But it always fell short for me. Objective-C fixed that.

#24

>Objective-C was Apple’s response to object-oriented programming Apple's response? At its inception it had nothing to do with Apple and for a long time was the language of NeXT. It's only since OSX that Apple has adopted Objective-C.

NeXT bought Apple for minus US$400 million and renamed itself Apple ;-)

Apple's CEO came from NeXT, as did their lead software architect. OSX is NeXT (ever wonder why so many things extend NSObject?).

Re: I loved C. But it always fell short for me. Objective-C fixed that.

#25
post #18

Earlier quoted context omitted.

I don't have a lot of experience in Go either (I'm writing my bot for the AI challenge in Go), but so far I've been very happy with it. What did you feel was odd?

I'm not the OP, but it felt like Go was coming from a culture a little bit different from the mainstream programming culture. The guys who made Go have worked together at Bell labs for year on stuff like Plan 9 and to me it seems that they lost touch with the rest of the world.

Fortunately the world is trying to keep up with them..

* Everything is a file (/proc, /net) * UTF-8 * WMII

I suppose that's enough for a research OS and its creators to be successful.

Re: I loved C. But it always fell short for me. Objective-C fixed that.

#26
Having learned object orientation with Smalltalk/V, I never quite liked C++ (to the point of procrastinating for 8 years before really touching it). It felt just wrong.

Objective-C was always attractive (I like C), but its close association with NeXT and Apple (and corresponding little support from other platforms) always puts me off.

Re: I loved C. But it always fell short for me. Objective-C fixed that.

#28

The only thing I really don't like about Objective C is that message passing is considerably slower than function calling. You just can not manipulate an image using the `setPixelX:Y:` method in anything close to real time. Using functions in C, this is no problem. So, there you go: Write your algorithms in C, write your program logic in Objective C. Oh, and I love how the OpenGL C API interacts so nicely with Object…

I tried MacRuby once a few months ago (https://github.com/tilltheis/fullscreenclock) and I have to tell you the Cocoa parts lacked some essential features (like correct syncing of Ruby and Cocoa setters). But the nice thing about it is that you can intermix Obj-C and Ruby code freely to write the low level parts of your app in C/Obj-C if you want to. There is even a bridge between C/Obj-C and Ruby which enables you to call native functions from your Ruby code.

Re: I loved C. But it always fell short for me. Objective-C fixed that.

#29

Objective-C is a natural language to learn for developers coming from Java too. And you don't have to give up the power of C (memory pointers etc...) either.

Objective-C is the choice if you are developing for Apple products. But coming from Java, C# and Mono were a much easier switch.

Re: I loved C. But it always fell short for me. Objective-C fixed that.

#30
Am I the only one who thinks Objective-C is complete crap compared to Scala, Haskell and the likes? Hell, even C++ is way faster to code in and provides a better experience. Obj C is just immensely verbose. I'd love to be able to use Qt + C++ to program iOS instead..
Post reply on HN