Re: More Xcode 7 inconsistency?
Re: More Xcode 7 inconsistency?
- Subject: Re: More Xcode 7 inconsistency?
- From: David Duncan <email@hidden>
- Date: Wed, 14 Oct 2015 16:51:10 -0700
> On Oct 14, 2015, at 4:36 PM, Shane Stanley <email@hidden> wrote:
>
> On 15 Oct 2015, at 4:02 AM, David Duncan <email@hidden> 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 (email@hidden)
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:
This email sent to email@hidden