Re: strong and readonly
Re: strong and readonly
- Subject: Re: strong and readonly
- From: Thomas Clement <email@hidden>
- Date: Thu, 12 Apr 2012 09:43:45 +0200
On Apr 12, 2012, at 9:27 AM, David Duncan wrote: On Apr 11, 2012, at 11:58 PM, Thomas CLEMENT < email@hidden> wrote:
On 12 avr. 2012, at 00:36, David Duncan < email@hidden> wrote: On Apr 11, 2012, at 3:23 PM, Rick Mann wrote: It doesn't really make sense to specify a property as both strong and readonly, right? strong/weak only make sense in the setting of a property, not the getting, right?
If you are going to internally redeclare the property as readwrite, then the memory management declaration (strong/weak/etc) needs to match. Hence the "strong, readonly" property.
Isn't that exposing implementation details of the class that have nothing to do in its public header?
Strictly speaking you could probably make that argument. If you want to make the private setter harder to get at, you can always use the "setter=setFoo:" syntax to make the synthesized setter something other than the default.
I don't want to obfuscate the setter. Just have a clean public interface. I don't see the point of having the compiler force the developer to add "strong" or "retain" to a readonly property.
Thomas
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden