FROM : Michael Watson
DATE : Sat Jul 15 07:16:26 2006
One returns an archived data object, and the other unarchives an
archived data object.
It's a semantics thing that follows convention throughout Cocoa, really.
--
Michael Watson
On 15 Jul, 2006, at 01:12, Rob Ross wrote:
>
> NSKeyedArchiver has this class method:
>
> + (NSData *)archivedDataWithRootObject:
>
> and NSKeyedUnarchiver has this class method:
>
> + (id)unarchiveObjectWithData:
>
> Why is the first method name in the past tense
> (achive_d_DataWithRootObject), while the second method name is in
> the present tense? That is, why isn't the first one just named:
>
> + (NSData *)archiveDataWithRootObject:
>
> since you're sending a message to class NSKeyedArchiver to
> "archive" some data, just as here:
>
> + (id)unarchiveObjectWithData:
>
> you're telling class NSKeyedUnarchiver to "unarchive" some data.
>
>
> I'm confused by the inconsistency.
>
>
> Rob Ross, Lead Software Engineer
> E! Networks
> ---------------------------------------------------
> "Beware of he who would deny you access to information, for in his
> heart he dreams himself your master." -- Commissioner Pravin Lal
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/mikey-san%
> 40bungie.org
>
> This email sent to <email_removed>
DATE : Sat Jul 15 07:16:26 2006
One returns an archived data object, and the other unarchives an
archived data object.
It's a semantics thing that follows convention throughout Cocoa, really.
--
Michael Watson
On 15 Jul, 2006, at 01:12, Rob Ross wrote:
>
> NSKeyedArchiver has this class method:
>
> + (NSData *)archivedDataWithRootObject:
>
> and NSKeyedUnarchiver has this class method:
>
> + (id)unarchiveObjectWithData:
>
> Why is the first method name in the past tense
> (achive_d_DataWithRootObject), while the second method name is in
> the present tense? That is, why isn't the first one just named:
>
> + (NSData *)archiveDataWithRootObject:
>
> since you're sending a message to class NSKeyedArchiver to
> "archive" some data, just as here:
>
> + (id)unarchiveObjectWithData:
>
> you're telling class NSKeyedUnarchiver to "unarchive" some data.
>
>
> I'm confused by the inconsistency.
>
>
> Rob Ross, Lead Software Engineer
> E! Networks
> ---------------------------------------------------
> "Beware of he who would deny you access to information, for in his
> heart he dreams himself your master." -- Commissioner Pravin Lal
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/mikey-san%
> 40bungie.org
>
> This email sent to <email_removed>
| Related mails | Author | Date |
|---|---|---|
| Rob Ross | Jul 15, 07:12 | |
| Michael Watson | Jul 15, 07:16 |






Cocoa mail archive

