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 5, 2012, at 2:01 PM, Jonathan Schleifer wrote:

>
> What about namespace.selector?
>
> [obj some.namespace.fooWithBar: bar];
> [obj performSelector: @selector(some.namespace.fooWithBar:)];
>
> Then it would at least be consistent ;).

See previous discussion: how do you create a selector that is not attached to a namespace? @selector(nil.fooWithBar:) implies that fooWithBar: is in a namespace called "nil", but that's a misunderstanding. @selector(.fooWithBar:) is almost indistinguishable from @selector(fooWithBar:), yet means something different—in fact, it could easily be misunderstood to imply that .fooWithBar is in some sort of "anonymous namespace" a la C++, which does not exist: all namespaces are peers, including the `default` namespace. It's just that `default` gets special treatment.

--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>)



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.