Live data from Hacker News

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

red-sweater.com

11–20 of 82 posts

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

#11

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 think the nature of OpenGL's API (internal state, very simple C-style functions - contrast with DX) means it is very portable. Java also interacts nicely with it, as does C++, and I've not worked with WebGL but the very fact it exists says something about it.

OpenGL is great. Really well designed :)

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

#12
post #6

Objective-C is a nice UI glue language but I wouldn't want to write anything of any algorithmic complexity in it. The data structures are just way too awkward and manual boxing/unboxing of primitives puts it way over the top. I write my iOS app UIs in Obj-C but the brains are in a C++ core. The new C++11 support in LLVM 3.0 has tipped the balance that much further.

> manual boxing/unboxing of primitives puts it way over the top

FWIW: https://github.com/NateStedman/FunSize/blob/master/FunSize/N...

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

#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 developers who don't think of themselves as purely Mac/iOS developers trying to take Obj-C back with them to other platforms?

Posts about how great or poor Obj-C is as a language are kind of irrelevant really as long as it's (effectively) the mandatory language for development on Apple platforms, and isn't much used beyond that. In that situation there are no choices to be made based on opinions about the language's merits or flaws, so they are largely moot.

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

#15

People who like C should definitely take a look at Go. I think it can be a good alternative for higher-level projects.

I was personally a little off-put by Go. Some things just felt a little odd to me, after an admittedly small amount of time with the language (implemented a trivial app with it to play around).

That said, I did quite like some aspects of it: goroutines, channels, functions can be added to structs.

I am hoping that rust makes it out of the lab at some point.

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

#16

People who like C should definitely take a look at Go. I think it can be a good alternative for higher-level projects.

I was personally a little off-put by Go. Some things just felt a little odd to me, after an admittedly small amount of time with the language (implemented a trivial app with it to play around). That said, I did quite like some aspects of it: goroutines, channels, functions can be added to structs. I am hoping that rust makes it out of the lab at some point.

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?

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

#17
post #8
post #2

Meh. I do not program in Objective-C but I think I can provide more reasons for liking the language than the linked article contains :) Reason 1: When you need what C provides, it is right there for you (being a superset of C) Reason 2: When you need what C does not provide (basic reflection, generics, polymorphism, whatever) it is in the "bracket" part of Objective-C. Reason 3: The two above do work quite well toget…

One of these days I will write a detailed account of my experience learning Obj-C, but for now I'll say this: The fact that Obj-C takes C and adds objects on top is its biggest flaw, just like with C++. Worse than C++ though, Obj-C doesn't even attempt to fix at least some of C's more glaring flaws... you get the whole language, quirks and all.

I think it depends on what you want from the language. If you want to write C and gain some safety through the use of the message-passing abstraction, it's perfect. If you want a real high-level language, it's lousy.

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

#18

Earlier quoted context omitted.

I was personally a little off-put by Go. Some things just felt a little odd to me, after an admittedly small amount of time with the language (implemented a trivial app with it to play around). That said, I did quite like some aspects of it: goroutines, channels, functions can be added to structs. I am hoping that rust makes it out of the lab at some point.

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.

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

#19
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…

As far as I am concerned, Obj-C and Cocoa are so tightly integrated into each other that using one without the other is a rather pointless exercise.

There are compilers available to use Obj-C (the language) on just about any platform. I guess you could use Obj-C to write GTK or Qt code (I doubt that the Qt preprocessor would like that, though).

If you read that Obj-C is great, that usually means that Obj-C is great for Cocoa. Cocoa and Obj-C make for a great team! Probably comparable to Android and Java or .NET and C#. It ultimately does not matter whether Obj-C would be of much use without Cocoa, since almost all people will be using it as part of Cocoa.

Great tires are of little import if you don't own a car.

Post reply on HN