I loved C. But it always fell short for me. Objective-C fixed that.
1–10 of 82 posts
Re: I loved C. But it always fell short for me. Objective-C fixed that.
#2Reason 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 together - the impedance mismatch is minimal, compared to e.g. Python with extensions written in C.
Re: I loved C. But it always fell short for me. Objective-C fixed that.
#3Re: I loved C. But it always fell short for me. Objective-C fixed that.
#4And you don't have to give up the power of C (memory pointers etc...) either.
Re: I loved C. But it always fell short for me. Objective-C fixed that.
#5Re: I loved C. But it always fell short for me. Objective-C fixed that.
#6I 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.
Re: I loved C. But it always fell short for me. Objective-C fixed that.
#7Objective-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.
Probably one of the easiest and more powerful ways to create an UI, but not as mature as other consacrated frameworks and not available on iOS anyway.
By the way, how do you handle unicode in the C++ core?
Re: I loved C. But it always fell short for me. Objective-C fixed that.
#8Meh. 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…
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.
Re: I loved C. But it always fell short for me. Objective-C fixed that.
#9Objective-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.
If you think Obj-C is nice, try Qt's QML - it's a declarative language with JSON-like syntax that also allows you to embed JS and interact with C++. Probably one of the easiest and more powerful ways to create an UI, but not as mature as other consacrated frameworks and not available on iOS anyway. By the way, how do you handle unicode in the C++ core?
So far I haven't had to do any serious string handling in my C++ engines (mostly audio apps). The new unicode stuff in C++11 ought to make this manageable but I haven't actually tried it yet.
Re: I loved C. But it always fell short for me. Objective-C fixed that.
#10So, 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 Objective C and Cocoa!
That said, I have a fair bit of experience with PyQt. I would ditch Objective C for something like MacRuby any day, but then I would (sorta) lose the ability to drop down to C if need be. (Still, does anyone have any solid experience in MacRuby? I would love to hear some!)