On Dec 6, 2008, at 11:15 AM, Charles Srstka wrote:
So would something which is clearly not a property, but still returns an object, such as:

myObj = mySet.anyObject;

or:

enumerator = myArray.objectEnumerator;

be considered kosher?

If you can write that and sleep well at night, then sure... go for it.

Seriously -- there isn't a hard defined line for this.

Personally, I initially found code like the above distasteful when I was first writing code with the dot syntax. At first, my thinking was much more hardline "if it is a setter/getter, use dot. Otherwise, do not.".

Over time, I have tended to write code like the above more and more often. -anyObject and -objectEnumerator don't really act on the target, they simply retrieve something from the target. And that is definitely in line with the thinking behind the dot syntax.

b.bum

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to