accept @pure @nothrow @return attributes

Jonathan M Davis via Digitalmars-d digitalmars-d at puremagic.com
Mon Jan 26 07:07:15 PST 2015


On Monday, January 26, 2015 13:21:54 via Digitalmars-d wrote:
> One meaning would be to only use "@" with attributes that do not
> affect computation, typing, overloading etc and use it only for
> safety-checks and optimization hints (like inlining).

All of the existing @ affect the type of the function. It's attributes like
public or static which don't, and those still affect aspects of compilation
and can easily cause compilation errors. There are not currently any
attributes which are simply hints to the compiler, and the ones which affect
the safety checks are _definitely_ part of the type of the function. So, I
don't think that that particular distinction would work, even if we could
freely rearrange which attributes had @ and which didn't.

- Jonathan M Davis



More information about the Digitalmars-d mailing list