<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2015-01-27 0:07 GMT+09:00 Jonathan M Davis via Digitalmars-d <span dir="ltr"><<a href="mailto:digitalmars-d@puremagic.com" target="_blank">digitalmars-d@puremagic.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">On Monday, January 26, 2015 13:21:54 via Digitalmars-d wrote:<br>
> One meaning would be to only use "@" with attributes that do not<br>
> affect computation, typing, overloading etc and use it only for<br>
> safety-checks and optimization hints (like inlining).<br>
<br>
</span>All of the existing @ affect the type of the function. It's attributes like<br>
public or static which don't, and those still affect aspects of compilation<br>
and can easily cause compilation errors. There are not currently any<br>
attributes which are simply hints to the compiler, and the ones which affect<br>
the safety checks are _definitely_ part of the type of the function. So, I<br>
don't think that that particular distinction would work, even if we could<br>
freely rearrange which attributes had @ and which didn't.<br></blockquote><div><br></div>Additional note: UDA can be attached to symbols only.<div><br></div><div>void foo() @uda {}</div><div>// __traits(getAttributes, foo) == (uda)</div><div>// pragma(msg, typeof(foo)); prints void(), no @uda</div><div><br></div><div>void function() @uda fp;</div><div>// Error: user defined attributes cannot appear as postfixes</div><div class="gmail_extra"><br></div><div>Kenji Hara </div></div></div></div>