Re: label URL
Re: label URL
- Subject: Re: label URL
- From: Shawn Erickson <email@hidden>
- Date: Tue, 31 Jan 2006 13:43:58 -0800
On 1/31/06, Andrew Thompson <email@hidden> wrote:
> Thanks for the code! That helps. I have a question though, I noticed
> in your library you preceded each variable with an underscore. I
> assume this is so that classes inheriting from NSHiperLink will not
> conflict by using variables with the same name.
The use of underscore as a prefix for instance variables is not really
the best naming scheme to use, for one Apple reserves the use of
underscore for their own.
"Do not use the underscore character as a prefix meaning that the
instance variable is private. Apple reserves the use of this
convention because its use by third parties could result in name-space
collisions. See "Private Methods" for a suggestion on prefixes for
private API." -
<http://developer.apple.com/documentation/Cocoa/Conceptual/CodingGuidelines/Articles/NamingIvarsAndTypes.html#//apple_ref/doc/uid/20001284>
> My question is, couldn't you acheive the same result by making them private?
No, making them private doesn't put them in a separate namespace.
-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >label URL (From: Andrew Thompson <email@hidden>) |
| >Re: label URL (From: Andrew Thompson <email@hidden>) |