• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Java vs Objetive-C
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Java vs Objetive-C


  • Subject: Re: Java vs Objetive-C
  • From: Christian Brunschen <email@hidden>
  • Date: Sat, 8 May 2004 14:51:38 +0100

On 8 May 2004, at 14:10, Brad O'Hearne wrote:

Tony,

I was unable to hit the link you provided (404), but I am very interested in seeing it. If you have an alternative link or can cut/paste the text into an email, please send it to me.

The correct link is <http://homepage.mac.com/spullara/rants/C1464297901/E775622191/ index.html>

The comparison that is used is essentially almost completely meaningless. It compares one thing and one thing only: the speed of comparing two strings. That's it. Never mind the fact that Objective-C's String class is actually a class cluster (one public superclass with a number of different subclasses) , whereas Java's String class is a single, final class (i.e., it is explicitly precluded from having subclasses) - in other words, that the comparison is very much apples vs oranges.

Also interesting is that there are actually two strings in the comparison chain that are equal, so the total amount of 'equal' comparison results should be the same as the number of times they are compared; yet his code explicitly says 'should be zero', and indeed it is when the code is run. The reason for this? The count of equal results is printed _before_ the comparisons are made, so of course it's zero. OK, this may be a simple coding mistake; but he's made the same mistake twice, in both Java and Objective-C. You'd think that he'd be anxious to get the correct result from his 'benchmark' program. Oh well.

I am a Java developer of 8 years that has just started developing in Objective-C. Java is a terrific language/platform, but it has some definite shortcomings that would make it foolish to abandon Objective-C -- and that's coming from someone heavily biased towards Java. In fact, my hope is that Apple buys Sun, and then can put some fresh life into the Java platform. Java is sadly lacking miserably in the desktop / GUI department (and not without protest from some of us developers), and there appears to be no public ear at Sun inclined toward the voice of reason regarding it. There are some of us in the Java community that feel that long term, the GUI dilemma may exile java to be a server-side, primarily web-technology only (or worse, threaten its existence). And again, I'm one of the Java-biased optimists.

Anyway, most performance articles I've seen for/against Java were fairly skewed, and didn't take into account pragmatism towards the problem being solved. "Faster" is a relative term, and may not be the most important factor in a technology decision anyway. In addition, I can tell you from first-hand experience that Java's auto array-bounds checking is a significant performance hit for those doing high-volumes of operations against large-arrays. I experienced this doing work with imaging. And my interest now among other things is doing some heavy I/O programming, which I am skeptical of basing on Java, just from the things I observed in working with large arrays in imaging.

There's also the point that the Java language is under the control of one of Apple's competitors - Sun - who are reluctant to surrender control of Java to anyone else; whereas Apple have complete control over Objective-C themselves. If I were Apple, I'd consider this to be a substantial advantage to Objective-C over Java (or C# or anything else that is controlled by a direct competitor, rather than, say, a separate standards body).

BradO

Best wishes,

// Christian Brunschen
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Re: Java vs Objetive-C (From: "Brad O'Hearne" <email@hidden>)

  • Prev by Date: Re: [semi-OT] Apple's Help Viewer: a note to the frustrated
  • Next by Date: Re: Java vs Objetive-C
  • Previous by thread: Re: Java vs Objetive-C
  • Next by thread: Re: Java vs Objetive-C
  • Index(es):
    • Date
    • Thread