<div class="gmail_quote">On 6 April 2012 10:48, Walter Bright <span dir="ltr"><<a href="mailto:newshound2@digitalmars.com">newshound2@digitalmars.com</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 4/6/2012 12:35 AM, Alex Rønne Petersen wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It actually can be a problem. In .NET land, there are many attributes across<br>
many projects (and even in the framework itself) with the same names. It turns<br>
out that regular namespace lookup rules alleviate this problem.<br>
</blockquote>
<br>
<br></div>
Perhaps a better scheme is:<br>
<br>
enum foo = 3;<br>
<br>
...<br>
<br>
@attr(foo) int x;<br>
<br>
That way, foo will follow all the usual rules.<br>
</blockquote></div><div><br></div>What about:<div><br></div><div>struct editor</div><div>{</div><div> this(string name, EditType, Colour = Colour.Default, string description = null)</div><div> {</div><div> //...</div>
<div> }</div><div><br></div><div> blah blah blah</div><div>}<br><div><div><br></div></div></div><div>@attr(editor("thing",...blah...))</div><div><br></div><div>I don't see the advantage over:</div><div>@editor(...)</div>
<div><br></div><div>?</div>