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 6:22 AM, Sam Deane wrote:

The most obvious solution that springs to mind is "::":

  [myObject myNamespace::arg1:... arg2:...];
  [myNamespace::SomeClass description];
  @selector(myNamespace::arg1:arg2:)
  @selector(::arg1:arg2:) // :: indicates nil namespace?

Note that the last two are already legal ObjC today. You're allowed to have a naked colon as part of a selector name. This is completely legal:

@interface Whatever
- (id): (int)a : (int)b : (int)c : (int)d;
@end

[whateverObj : 1 : 2 : 3 : 4];

And to get the selector for this method, you'd write @selector(::::).

Due to this, I'd say that :: is probably not the best choice.

How about backticks? Nobody ever uses those.... :)

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



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.