Re: Objective-C Question
Re: Objective-C Question
- Subject: Re: Objective-C Question
- From: Brent Gulanowski <email@hidden>
- Date: Tue, 23 Sep 2003 17:26:31 -0400
On Monday, September 22, 2003, at 04:51 PM, Dietmar Planitzer wrote:
All instance variables of a class are by default protected. All
methods are public. Further, while there is a way to control the
access mode of instance variables, there is no way to control access
to instance or class methods.
I would very much welcome the addition of method access control.
Well the general solution to this is to define a category inside your
class's implementation with the private methods you want, although
these won't be available at any kind of intermediary stage -- it's the
equivalent of @private, but there is no @protected that I have found.
Possibly you have already seen and rejected this solution.
The use of the @protected access is one I never quite understood,
except in rare circumstances where speed is essential, but the wise say
that a better algorithm should always provide better solutions there.
For the record, I am one of those who came to Cocoa and Objective-C
only with the release of OS X Server, and I was immediately won over
from C, C++ and Java. It just fit my personality. I like to postpone
decisions to the last possible minute. Plus I really like brackets.
--
Brent Gulanowski email@hidden
_______________________________________________
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.