• 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: Objective-C Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Objective-C Question


  • Subject: Re: Objective-C Question
  • From: Sheehan Olver <email@hidden>
  • Date: Tue, 23 Sep 2003 02:25:27 -0500

"final" has virtually no performance advantage in java, at least according to a book written by a developer of java at sun that I read (I forgot the name, it was a list of "need to know" for the language). The purpose of the final keyword is simply to prevent someone from overriding a method, for security reasons. You can't have a security framework if java can't guarantee that the code its running is what it thinks its running, hence it prevents you from overriding crucial methods. Also, its part of the "fail-fast" methodology, as if a method should not be overridden then it makes sense to declare it final so people know this.
Remember, java and Objective-C have *completely* different targets, and you can't really criticize the features of java or objective-c without taking this into account. Objective-C does not care about security anymore than C is, that is to say that the code can do anything that the user can. Java can be run from a web browser, hence a lot of the dynamics of Objective-C would pose security problems. If you like java, use java. If you like Objective-C, use Objective-C. The quality of a language and its features is largely subjective, so its pointless to get into arguments about which is better.


On Monday, September 22, 2003, at 11:44 AM, email@hidden wrote:

1) Being a able to make a method and/or class "final",
i.e. it can't be overridden or subclassed.

Why? This is a stupid hack to try to get more efficiency out of Java.
If the J-heads had spent their time implementing efficient dynamic
dispatch instead of trying to fake it with static binding half the time
they wouldn't need it.
_______________________________________________
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.

  • Prev by Date: NSMovieView problem
  • Next by Date: NSMenuExtra tutorial Part 1 of 2
  • Previous by thread: Re: Objective-C Question
  • Next by thread: Re: Objective-C Question
  • Index(es):
    • Date
    • Thread