I'd actually go a step further and argue Objective-C is actually closer to Ruby than to C. So close, in fact, that MacRuby implements Ruby's object system using Objective-C's runtime. Syntax and naming conventions are another matter...
Stop the Hate: Obj-C Deserves Your Love
21–30 of 91 posts
Re: Stop the Hate: Obj-C Deserves Your Love
#22Re: Stop the Hate: Obj-C Deserves Your Love
#23This makes me feel old -- when I was learning programming/CS, memory management and storage classes were part of basic training. Now we've got a generation of programmers who've never had to worry about these things.
However, I fail to see why I should have to worry about it and do it manually.
Re: Stop the Hate: Obj-C Deserves Your Love
#24Language research has progressed. Microsoft has invested heavily in C# and related technologies. Even Smalltalk research moved on -- strongtalk, newspeak. We have alternative, real-world usable languages running on the JVM, from Scala to Clojure.
Yet Objective-C moves forward one slow, stuttering step at a time. There are no namespaces. There are no self types (your init methods all have to return id so that they don't conflict with other init methods that have the same name). There are no private methods. Writing an initializer takes 3 lines of boilerplate, every time, plus the header declaration:
if ((self = [super init]) == nil)
return nil;
return self;
The language is obtuse, ridiculously verbose, frustrating to use, and downright paleolithic compared to modern deployed languages. It's a joke compared to everyone else's modern language research. I suffer through it full time because that's what the platform demands, but I would shoot it in the head in a second if I could.Nuke it from orbit. It's the only way to be sure.
Anyone who thinks ObjC is a good language either hasn't actually spent significant time outside of C/C++/ObjC, or is still new to the wide, wonderful world of Mac/iPhone development.
Re: Stop the Hate: Obj-C Deserves Your Love
#25Ruby --> Obj-C or PHP --> Obj-C
Just for references sake. Or some "gotchas".
Re: Stop the Hate: Obj-C Deserves Your Love
#26I'm supposed to be impressed because Obj-C does reference counting? It really is sad that so little of the state of the art in GC is available in mainstream languages.
You could contrast it with malloc/free in the unix/C ecosystem. Get a pointer back from function X in library Y. What do you do when you are done? free? call X_Z? constraints on the order of freeing dependent objects? That is a trip to the man pages every time.
Re: Stop the Hate: Obj-C Deserves Your Love
#27This makes me feel old -- when I was learning programming/CS, memory management and storage classes were part of basic training. Now we've got a generation of programmers who've never had to worry about these things.
Assembler was probably part of many peoples basic training as well. Do you want to spend your days juggling everything in 4 general purpose registers because it makes you feel like a better programmer? Is that the best use of your time?
Re: Stop the Hate: Obj-C Deserves Your Love
#28NSObject Class Reference
– performSelector:
– performSelector:withObject:
– performSelector:withObject:withObject:
why stop there, lets tack on more withObject arguments
Re: Stop the Hate: Obj-C Deserves Your Love
#29I don't understood why people think automatic deallocation = garbage collection = slow language. You can have reference counting without garbage collection. It's pretty obvious to a compiler when a variable has gone out of scope and can be dereferenced (and deallocated immediately at 0). Using a language like obj-c where you have to do memory management manually just seems so archaic after using modern languages. Plu…
>Using a language like obj-c where you have to do memory management manually just seems so archaic after using modern languages. That's not an Objective C thing, the language has garbage collection, just it isn't enabled for the mobile platform, for the reason it eats power and memory.
Re: Stop the Hate: Obj-C Deserves Your Love
#30As someone who has been, on and off, writing Objective-C for the past decade, I will unequivocally state that as application programming languages go, it's a terrible 1980s jalopy of bad language decisions cobbled on top of more bad language design under which Smalltalk-descendent ideas peek through now and then. Language research has progressed. Microsoft has invested heavily in C# and related technologies. Even Sma…