On Fri, Jul 18, 2008 at 4:21 PM, Andy Lee <[EMAIL PROTECTED]> wrote:
> On Jul 18, 2008, at 3:49 PM, Michael Ash wrote:
>> The better term already exists: "own". As in, "you own the return
>> value" or "you do not own the return value". This tells you everything
>> you need to know.
>
> Well, as I said I don't agree with the connotations of "own."

I find that objection to be rather odd. Your objections are all corner
cases, or things where the English usage doesn't *quite* line up with
the programming usage. But you have no problem with "autoreleased"
even though it is just plain wrong.

In any case, none of your objections appear to apply to the use of the
word "own" to describe the status of an object returned from a method.

>  I'm not even
> comfortable with "you" -- who is "you"?

This is just a bit of informality. In formal documentation I would
expect this to read as "The caller owns the return value" and "The
caller does not own the return value".

>  But once you accept the terms, "you
> own the return value" has the benefit of being concise and consistent.
>
> What would you use for adjectives -- "owned" and "unowned"?

Owned and "not owned", if you needed them. I'd try to avoid them at
least for describing return values; the sentences I propose above get
the point across better without needing them. "Returns an owned
object" is not really sensible; you need to say *who* owns it,
precisely to address the possibility of multiple owners which you
mentioned in a previous post. You can say "owned by X", but then you
might as well reverse it and get rid of the passive voice.

Mike
_______________________________________________

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