Jens,<div><br></div><div>do you mean?</div><div><br></div><div>@interface MyClass : NSObject {</div><div><br></div><div>}</div><div>@namespace ns</div><div>- method;<br>@end</div><div><br></div><div>@namespace my</div><div>

- method;</div><div>@end</div><div><br></div><div>// global</div><div>@namespace </div><div>- method;</div><div>@end</div><div><br></div><div><br><div class="gmail_quote">On Fri, Nov 12, 2010 at 3:12 AM, Jens Ayton <span dir="ltr"><<a href="mailto:mailing-lists.jens@ayton.se">mailing-lists.jens@ayton.se</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Nov 9, 2010, at 22:54, Owen Shepherd wrote:<br>
><br>
><br>
> The hardest aspect seems to be namespacing of selectors; it seems to be an issue which I haven't really seen affecting other languages, and seems a rather difficult one to solve elegantly, though I must ask: Is it a major issue in practice? I haven't found it to be, and haven't found other people claiming it to be either, though I don't claim that it doesn't exist.<br>


<br>
</div>Yes. Selector conflicts are more subtle and therefore nastier than class name conflicts, and far more onerous to handle using prefixes. Given the choice, I’d much rather have namespaces for selectors than for classes.<br>


<br>
(An advantage of only namespacing selectors is that you could use the most elegant namespace separator I’ve come across: a space. [object namespace method] is unambiguous, as long as you don’t also allow [namespace Class method]. I don’t expect this idea to win the day, though.)<br>


<br>
As a practical example of a selector conflict, I once had an app crash on one user’s machine because it had a convenience method -[NSDictionary setDouble:forKey:], and an input manager hack defined a -setDouble:forKey: with conflicting semantics. I’ve heard of people being bitten by conflicts with methods introduced in superclasses in system updates, too.<br>


<div class="im"><br>
<br>
On Nov 10, 2010, at 00:50, Owen Shepherd wrote:<br>
><br>
><br>
> Namespaces are a property of types, of which objects are just one form<br>
<br>
</div>Namespaces are a property of names, of which types are just one form.<br>
<div class="im"><br>
<br>
On Nov 11, 2010, at 19:41, jahanian wrote:<br>
><br>
> 1. Somehow c has survived 30+ years not needing namespaces. I am told that it is not on the table yet.<br>
<br>
</div>C (per se) doesn’t have dynamic name lookups.<br>
<br>
<br>
--<br>
<font color="#888888">Jens Ayton<br>
</font><div><div></div><div class="h5"><br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>best regards<br>Ariel<br>
</div>