> On Oct 14, 2015, at 4:36 PM, Shane Stanley <sstan...@myriad-com.com.au> wrote:
> 
> On 15 Oct 2015, at 4:02 AM, David Duncan <david.dun...@apple.com> wrote:
>> 
>> The helpful followup is that it is generally encouraged to use empty 
>> containers (@[] or @{}) over nil when there is no semantic difference, as is 
>> the case for the aforementioned API.
> 
> OK, but the docs still say: "The dictionary contains values from Document 
> Types and must at least contain NSDocumentTypeDocumentAttribute." That 
> suggests to me that an empty dictionary is not allowed.

I can’t speak for either the documentation or the implementation in this case, 
but I think the reasonable conclusion to make here is that either nil is 
allowed, or an empty dictionary is allowed, despite the documentation basically 
saying that both are disallowed, otherwise you cannot maintain the same API 
contract as was previously available.

I understand thats not a terribly satisfying answer, but given the direction I 
would suspect an empty dictionary is perfectly fine in this case.

--
David Duncan


_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to