Why do some attributes start with '@' while others done't?
    Dicebot via Digitalmars-d 
    digitalmars-d at puremagic.com
       
    Thu Jan 21 19:55:10 PST 2016
    
    
  
On Friday, 22 January 2016 at 03:18:29 UTC, Timon Gehr wrote:
> On 01/22/2016 03:20 AM, Dicebot wrote:
>> I'd definitely place something like `@safe` in type 
>> constructors
>
> @safe(int) ?
Normally I rely on this definition:
feature .. builds new types from old ones 
(https://en.m.wikipedia.org/wiki/Type_constructor)
That matches my intuitive expectations. I.e. plain 'extern' is a 
storage class because for `const int x; extern int y;` type of y 
is still plain into but x is const(int)
@safe functions do have distinct type thus I'd expect it to be 
type qualifier/constructor. However D seems to use different 
classification that isn't documented anywhere.
    
    
More information about the Digitalmars-d
mailing list