RE: Objective-C Question
RE: Objective-C Question
- Subject: RE: Objective-C Question
- From: email@hidden
- Date: Mon, 22 Sep 2003 11:57:04 -0600
On Monday, September 22, 2003, at 09:59 AM, Alastair J.Houghton wrote:
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.
AFAIUI it isn't an efficiency hack... it's there to implement the
security for the sandbox; without it you couldn't provide a secure
environment within which to run applets using only the facilities of
the Java language.
Its both - if the compiler knows the class is final - it can bypass the
dynamic dispatch mechanism and generate a static call in place. This
was felt necessary for String for instance.
4) Being able to specify the access control of members
(public, protected, private). Isn't everything public
in Obj C? Sorry, I'm a newbie here, but isn't data
encapsulation part of the object model?
What makes you think you know better than I what members should and
shouldn't be callable? There are conventions for specifying private
members - name them with a leading underscore
That's Apple's convention, and it's reserved for their use (search the
archives for a [fairly] recent thread on the subject).
yeah sure - you could also just name them like Smalltalkers and call
them privateMethodName - it doesn't get any clearer than that.
As for my attitude - perhaps I should apologize - but I'm a bit tired
of defending everything else for not being Java.
-Todd Blanchard
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ
http://developer.apple.com/java/faq/ before
posting
Do not post admin requests to the list. They will be ignored.
_______________________________________________
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.