Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Draft Proposal for Namespaces in Objective-C
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Draft Proposal for Namespaces in Objective-C



On Apr 12, 2012, at 7:20 AM, Remy Demarest <email@hidden> wrote:

> I would say to keep the selector namespacing for later, this is a completely different matter and I don't think you'd implement it the same way.

As Ken implied, namespacing of selectors is the primary motivation of this proposal. We have had actual issues where Apple has rejected our apps for falsely-detected use of private API, or have added API to a superclass that has interfered with our logic.

>
> Namespacing classes and protocols should be less of a headache than the namespacing selectors.

This is true, and will save us from another class of problems that has bitten us recently: classes publicly revealed in OSes that are actually present but private in previous OSes. Apple's recommended best practice of using NSClassFromString() ==vnil checks fails us here and leads to unrecognized selector crashes.

According to one of my coworkers, we have encountered this issue with UIGestureRecognizer, CLGeoLocator, and EKReminder. I'm not sure if any of the buggy code made it out to the wild.

Of course, namespaces don't help unless Apple adopts them, but hopefully people understand why they're important.

--Kyle Sluder
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Draft Proposal for Namespaces in Objective-C (From: Kyle Sluder <email@hidden>)
 >Re: Draft Proposal for Namespaces in Objective-C (From: Kyle Sluder <email@hidden>)
 >Re: Draft Proposal for Namespaces in Objective-C (From: Kyle Sluder <email@hidden>)
 >Re: Draft Proposal for Namespaces in Objective-C (From: Jonathan Schleifer <email@hidden>)
 >Re: Draft Proposal for Namespaces in Objective-C (From: Kyle Sluder <email@hidden>)
 >Re: Draft Proposal for Namespaces in Objective-C (From: Jens Ayton <email@hidden>)
 >Re: Draft Proposal for Namespaces in Objective-C (From: Uli Kusterer <email@hidden>)
 >Re: Draft Proposal for Namespaces in Objective-C (From: Ian Joyner <email@hidden>)
 >Re: Draft Proposal for Namespaces in Objective-C (From: Michael Ash <email@hidden>)
 >Re: Draft Proposal for Namespaces in Objective-C (From: Ian Joyner <email@hidden>)
 >Re: Draft Proposal for Namespaces in Objective-C (From: Kyle Sluder <email@hidden>)
 >Re: Draft Proposal for Namespaces in Objective-C (From: Remy Demarest <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.