Earlier quoted context omitted.
As someone who does a ton of Objective-C, I challenge the notion that namespaces are even remotely necessary. I've also done development in nearly everything under the sun, in nearly every "popular" language under the sun, which challenges your other assumption that anyone who thinks Objective-C is good hasn't spent time outside of C/C++/Objective-C. I'm guessing you've never written a Windows app with C++ and MFC. O…
When was the last time you've used C#? The fact you are lumping it in with Java already suggests your C# skills are very out of date. C# is by far the fastest growing mainstream language. C# 3 and now C# 4 require very little boilerplate code. I'm often amazed at how clean and succinct my C# code can become nowadays. As for UI programming in C#, give WPF and/or Silverlight a try. They both have their downsides, but i…
Stop the Hate: Obj-C Deserves Your Love
81–90 of 91 posts
Re: Stop the Hate: Obj-C Deserves Your Love
#82Earlier quoted context omitted.
And as someone who is currently writing high-performance ObjC code, and who has written internet-scale packets-per-second-metered code in C and C++, I call bullshit on this. I have no doubt that method dispatch is significantly slower than vtables, but you're ignoring the fact that for performant code, plenty of C++ devs believe that vtables are far too slow as well. Large high-performance C-style projects are always…
Worth reviewing: http://www.mikeash.com/pyblog/performance-comparisons-of-com...
Re: Stop the Hate: Obj-C Deserves Your Love
#83Didn't see a single explanation of why the language deserves my love. Let's see. * The language is verbose. * Practically speaking, it's only used to developer for two platforms (OSX and iOS). * The frameworks for those platforms are MEGA verbose. * The memory management model for the iOS platform is not GC, and it's not manual management. Frankly I found manual management of memory simpler than retain/release. And t…
> Typically have to deal with two different kind of strings (NS versus C). NSString has plenty of methods to deal with this, and you get boxing for free between CFString and NSString. > The frameworks for those platforms are MEGA verbose. Which some view as self documenting.
Re: Stop the Hate: Obj-C Deserves Your Love
#84Earlier quoted context omitted.
Worth reviewing: http://www.mikeash.com/pyblog/performance-comparisons-of-com...
So on 64-bit architectures Obj-C messages are eight times slower than a vtable lookup. There's no way that could make or break an apps performance, right?
Nice try, though.
Re: Stop the Hate: Obj-C Deserves Your Love
#85The discussion for another article on the front page discusses why, even today, many developers prefer C-family languages over Java for developing user interfaces, because of unpredictable delays in responsiveness with garbage controlled languages. In that context, Objective C is the closest you will find to a best of both worlds language for responsive user interfaces. Being a strict superset of C, you can control t…
You can easily get unpredictable delays in responsiveness with reference counting too. How can you be sure releasing that reference isn't going to unleash the teardown of some huge data structure?
Re: Stop the Hate: Obj-C Deserves Your Love
#86Earlier quoted context omitted.
@cageface really? you can't refute my point, so you instead try to correct my spelling to make yourself look smarter?
If you choose to attack someone's intelligence instead of presenting a factual counterargument then it behooves you to get your spelling right. So again, how can you be sure that the reference you just released isn't the last live pointer to some huge datastructure that now has to be torn down reference-by-reference?
If you release an object and it gets torn down, it means you didn't increment the ref in the right place. And I don't get how release/retain is such a difficult concept to grasp. If you don't think you can deal with it, should this be your profession?
Re: Stop the Hate: Obj-C Deserves Your Love
#87Earlier quoted context omitted.
If you choose to attack someone's intelligence instead of presenting a factual counterargument then it behooves you to get your spelling right. So again, how can you be sure that the reference you just released isn't the last live pointer to some huge datastructure that now has to be torn down reference-by-reference?
Like I said, if that happens you are doing something incredibly wrong. It is your error. It's not the language, it's bad programming, bad architecture, bad whatever. If you release an object and it gets torn down, it means you didn't increment the ref in the right place. And I don't get how release/retain is such a difficult concept to grasp. If you don't think you can deal with it, should this be your profession?
If you release the last pointer to a complex datastructure that has no other references, you certainly should hope it gets "torn down" = deallocated. If that object happened to contain a lot of other objects they will each in turn have to be released. Obviously your main code execution path is going to halt while this graph is walked and released.
Maybe Jimbokun is right that you can control this better in a ref counting scheme than in a typical GC but you're hardly immune from the problem.
Re: Stop the Hate: Obj-C Deserves Your Love
#88Earlier quoted context omitted.
So on 64-bit architectures Obj-C messages are eight times slower than a vtable lookup. There's no way that could make or break an apps performance, right?
No, there isn't. Because in any application where that code path was at the top of your profile, you'd code around it with direct function invocation, just like people do in C++ with expensive chains of vtable calls (which you end up with in GoF-style code). Nice try, though.
This is why it's easy enough for advocates of python/php/ruby to say "just code the slow parts in c" but often far harder to actually do this without losing any advantage the higher level language bought you in the first place.
Re: Stop the Hate: Obj-C Deserves Your Love
#89Earlier quoted context omitted.
No, there isn't. Because in any application where that code path was at the top of your profile, you'd code around it with direct function invocation, just like people do in C++ with expensive chains of vtable calls (which you end up with in GoF-style code). Nice try, though.
In many real world apps there just isn't a single chokepoint but overhead distributed over your entire object model. C++ gives you 8x the breathing room that Obj-C does before you have to start tearing your abstractions apart and coding direct. For a codebase of any real size that can easily be a dealbreaker. This is why it's easy enough for advocates of python/php/ruby to say "just code the slow parts in c" but ofte…
Re: Stop the Hate: Obj-C Deserves Your Love
#90Earlier quoted context omitted.
In many real world apps there just isn't a single chokepoint but overhead distributed over your entire object model. C++ gives you 8x the breathing room that Obj-C does before you have to start tearing your abstractions apart and coding direct. For a codebase of any real size that can easily be a dealbreaker. This is why it's easy enough for advocates of python/php/ruby to say "just code the slow parts in c" but ofte…
Comparing the amount of time it takes to refactor an expensive (inner-loop) series of message invocations into a direct function call to the amount of time it takes to recode Ruby in C and bridge it with an FFI is specious.